vcgVertexNeighbors: Compute mesh adjacency list representation or the vertex...

View source: R/vcgVertexNeighbors.r

vcgVertexNeighborsR 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 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.

Value

list of positive integer vectors, the neighborhoods.

Examples

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


Rvcg documentation built on Sept. 30, 2024, 9:39 a.m.