mesh_to_cubes.Rd
Get cubes coordinates from voxelized mesh3d
mesh_to_cubes(mesh, voxelSize, scene_dim = c(10, 545))
mesh | 3dmesh |
---|---|
voxelSize | voxel size for space discretization |
scene_dim | Dimensions of the scene (min and max coordinates). Vector of size 2 or 2*3 data.frame with named columns x, y, z. |
library(Rvcg) simple_mesh <- Rvcg::vcgIcosahedron() cubes <- mesh_to_cubes(simple_mesh, voxelSize = 0.5)#> Resampling mesh using a volume of 9 x 9 x 9 #> VoxelSize is 0.500000, offset is 0.000000 #> Mesh Box is 3.236068 3.236068 3.236068#>#> #> #> #>