vcg_update_normals {ravetools} | R Documentation |
Update vertex normal
Description
Update vertex normal
Usage
vcg_update_normals(
mesh,
weight = c("area", "angle"),
pointcloud = c(10, 0),
verbose = FALSE
)
Arguments
mesh |
triangular mesh or a point-cloud (matrix of 3 columns) |
weight |
method to compute per-vertex normal vectors: |
pointcloud |
integer vector of length 2: containing optional parameters for normal calculation of point clouds; the first entry specifies the number of neighboring points to consider; the second entry specifies the amount of smoothing iterations to be performed. |
verbose |
whether to verbose the progress |
Value
A 'mesh3d'
object with normal vectors.
Examples
if(is_not_cran()) {
# Prepare mesh with no normal
data("left_hippocampus_mask")
mesh <- vcg_isosurface(left_hippocampus_mask)
mesh$normals <- NULL
# Start: examples
new_mesh <- vcg_update_normals(mesh, weight = "angle",
pointcloud = c(10, 10))
rgl_view({
rgl_call("mfrow3d", 1, 2)
rgl_call("shade3d", mesh, col = 2)
rgl_call("next3d")
rgl_call("shade3d", new_mesh, col = 2)
})
}
[Package ravetools version 0.1.7 Index]