Skip to content

Commit 53383ae

Browse files
Created README
1 parent 7a66930 commit 53383ae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# voxelizer-rs
2+
A Rust port of karimnaaji's C Voxelizer
3+
4+
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);
21+
```

0 commit comments

Comments
 (0)