Learn R Programming

Rvcg (version 0.24)

vcgVertexNeighbors: 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)

Value

list of positive integer vectors, the neighborhoods.

Arguments

x

tmesh3d instance from the rgl package

vi

optional, vector of positive vertex indices for which to compute the neighborhoods. All vertices are used if left at the default value NULL.

numstep

positive integer, the number of times to extend the neighborhood from the source vertices (the k for computing the k-ring neighborhood). Setting this to high values significantly increases the computational cost.

include_self

logical, whether the returned neighborhood for a vertex i should include i itself.

Examples

Run this code
data(humface)
adjacency_list <- vcgVertexNeighbors(humface)
v500_5ring = vcgVertexNeighbors(humface, vi=c(500), numstep = 5)

Run the code above in your browser using DataLab