vcgPlyWrite: Export meshes to PLY-files

View source: R/vcgPlyWrite.r

vcgPlyWriteR Documentation

Export meshes to PLY-files

Description

Export meshes to PLY-files (binary or ascii)

Usage

vcgPlyWrite(mesh, filename, binary = TRUE, ...)

## S3 method for class 'mesh3d'
vcgPlyWrite(
  mesh,
  filename = dataname,
  binary = TRUE,
  addNormals = FALSE,
  writeCol = TRUE,
  writeNormals = TRUE,
  ...
)

## S3 method for class 'matrix'
vcgPlyWrite(mesh, filename = dataname, binary = TRUE, addNormals = FALSE, ...)

Arguments

mesh

triangular mesh of class 'mesh3d' or a numeric matrix with 3-columns

filename

character: filename (file extension '.ply' will be added automatically, if missing.

binary

logical: write binary file

...

additional arguments, currently not used.

addNormals

logical: compute per-vertex normals and add to file

writeCol

logical: export existing per-vertex color stored in mesh$material$color

writeNormals

write existing normals to file

Examples

data(humface)
vcgPlyWrite(humface,filename = "humface")
## remove it 
unlink("humface.ply")

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