You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Rust port of karimnaaji's mesh voxelizer written in C. It is simple to use and has been carefully ported to Rust to give the most seamless experience possible.
5
+
6
+
## Examples
7
+
1. Voxelizing a mesh
8
+
```
9
+
let mesh = Mesh::new(vertices, colours, normals, indices);
10
+
let voxelized = mesh.voxelize(voxel_size, precision);
11
+
```
12
+
2. Voxelizing a mesh into a point cloud
13
+
```
14
+
let mesh = Mesh::new(vertices, colours, normals, indices);
15
+
let pointcloud = mesh.voxelize_pointcloud(voxel_size, precision);
16
+
```
17
+
3. Voxelizing a mesh into a texture (colour array).
18
+
```
19
+
let mesh = Mesh::new(vertices, colours, normals, indices);
20
+
let voxels = mesh.voxelize_texture(width, height, depth);
0 commit comments