| transform_mesh | R Documentation |
Transforms all vertex positions in a mesh by a 4x4 homogeneous
matrix (applied as M * (x, y, z, 1)^T). Vertex colors and
normals are untouched.
transform_mesh(mesh, matrix)
mesh |
A mesh descriptor list with |
matrix |
A 4x4 numeric matrix. |
A new mesh descriptor list with transformed vertices.
mesh <- generate_cuboid(c(0, 0, 0), c(1, 1, 1))
mat <- diag(4)
mat[1:3, 4] <- c(2, 3, 4)
translated <- transform_mesh(mesh, mat)
translated$vertices[1, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.