Import common mesh file formats and store the results in an object of class "mesh3d" - momentarily only triangular meshes are supported.
vcgImport(
file,
updateNormals = TRUE,
readcolor = FALSE,
clean = TRUE,
silent = FALSE
)
Object of class "mesh3d"
with:
4 x n matrix containing n vertices as homolougous coordinates
3 x m matrix containing vertex indices forming triangular faces
4 x n matrix containing vertex normals (homologous coordinates)
in case the imported files contains face or vertex quality, these will be stored as vectors named $quality (for vertex quality) and $facequality
if the imported file contains vertex colors and readcolor = TRUE, these will be saved in $material$color according to "mesh3d" specifications.
character: file to be read.
logical: if TRUE and the imported file contais faces, vertex normals will be (re)calculated. Otherwise, normals will be a matrix containing zeros.
if TRUE, vertex colors and texture (face and vertex) coordinates will be processed - if available, otherwise all vertices will be colored white.
if TRUE, duplicated and unreferenced vertices as well as duplicate faces are removed (be careful when importing point clouds).
logical, if TRUE no console output is issued.
Stefan Schlager
vcgSmooth
data(humface)
vcgPlyWrite(humface)
readit <- vcgImport("humface.ply")
Run the code above in your browser using DataLab