vcgGetEdge: Get all edges of a triangular mesh

View source: R/vcgGetEdge.r

vcgGetEdgeR Documentation

Get all edges of a triangular mesh

Description

Extract all edges from a mesh and retrieve adjacent faces and vertices

Usage

vcgGetEdge(mesh, unique = TRUE)

Arguments

mesh

triangular mesh of class 'mesh3d'

unique

logical: if TRUE each edge is only reported once, if FALSE, all occurences are reported.

Value

returns a dataframe containing:

vert1

integer indicating the position of the first vertex belonging to this edge

vert2

integer indicating the position of the second vertex belonging to this edge

facept

integer pointing to the (or a, if unique = TRUE) face adjacent to the edge

border

integer indicating if the edge is at the border of the mesh. 0 = no border, 1 = border

Examples

require(rgl)
data(humface)
edges <-vcgGetEdge(humface)
## Not run: 
## show first edge
lines3d(t(humface$vb[1:3,])[c(edges$vert1[1],edges$vert2[2]),],col=2,lwd=3)
shade3d(humface, col=3)
## now find the edge - hint: it is at the neck.

## End(Not run)

zarquon42b/Rvcg documentation built on April 11, 2024, 3:17 a.m.