unrefVertex | R Documentation |
some little helpers for vertex operations on triangular meshes
unrefVertex(mesh)
rmVertex(mesh, index, keep = FALSE)
vert2points(mesh)
rmUnrefVertex(mesh, silent = FALSE)
mesh |
triangular mesh of class |
index |
vector containing indices of vertices to be removed. |
keep |
logical: if |
silent |
logical: suppress output about info on removed vertices. |
extract vertex coordinates from meshes, find and/or remove (unreferenced) vertices from triangular meshes
unrefVertex
finds unreferenced vertices in triangular meshes of class
mesh3d
or tmesh3d
.
rmVertex
removes specified vertices from triangular meshes.
vert2points
extacts vertex coordinates from triangular meshes.
rmUnrefVertex
removes unreferenced vertices from triangular meshes.
unrefVertex
: vector with indices of unreferenced vertices.
rmVertex
: returns mesh with specified vertices removed and faces and
normals updated.
vert2points
: k x 3 matrix containing vertex coordinates.
rmUnrefVertex
: mesh with unreferenced vertices removed.
Stefan Schlager
ply2mesh
, file2mesh
require(rgl)
data(nose)
testmesh <- rmVertex(shortnose.mesh,1:50) ## remove first 50 vertices
## Not run:
shade3d(testmesh,col=3)### view result
## End(Not run)
testmesh$vb <- cbind(testmesh$vb,shortnose.mesh$vb[,1:50]) ## add some unreferenced vertices
## Not run:
points3d(vert2points(testmesh),col=2)## see the vertices in the holes?
## End(Not run)
cleanmesh <- rmUnrefVertex(testmesh)## remove those lonely vertices!
## Not run:
pop3d()
points3d(vert2points(cleanmesh),col=2) ### now the holes are empty!!
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.