vcgVertexNeighbors {Rvcg} | R Documentation |
Compute mesh adjacency list representation or the vertex neighborhoods of specific mesh vertices.
Description
Compute the k
-ring vertex neighborhood for all query vertex indices vi
. If only a mesh is passed (parameter x
) and the other parameters are left at their default values, this compute the adjacency list representation of the mesh.
Usage
vcgVertexNeighbors(x, vi = NULL, numstep = 1L, include_self = FALSE)
Arguments
x |
tmesh3d instance from the |
vi |
optional, vector of positive vertex indices for which to compute the neighborhoods. All vertices are used if left at the default value |
numstep |
positive integer, the number of times to extend the neighborhood from the source vertices (the |
include_self |
logical, whether the returned neighborhood for a vertex |
Value
list of positive integer vectors, the neighborhoods.
Examples
data(humface)
adjacency_list <- vcgVertexNeighbors(humface)
v500_5ring = vcgVertexNeighbors(humface, vi=c(500), numstep = 5)