vcgGetEdge: Get all edges of a triangular mesh

Description Usage Arguments Value Examples

View source: R/vcgGetEdge.r

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 Jan. 17, 2019, 9:10 a.m.