4 releases (2 breaking)
0.3.0 | Dec 17, 2024 |
---|---|
0.2.1 | Aug 26, 2024 |
0.2.0 | Jun 23, 2024 |
0.1.0 | Jun 22, 2024 |
#5 in #end
137 downloads per month
10KB
182 lines
Voxel Traversal Algorithm
This is a rust port of https://github.com/francisengelmann/fast_voxel_traversal.
Example
// f32
voxel_traversal::voxel_traversal(
start, // (f32,f32,f32)
end, // (f32,f32,f32)
|pos, normal| { // (i32,i32,i32), (i32,i32,i32)
// return true to exit
if (pos.0 == 0) {
return true;
} else {
// return false to continue traversing
return false
}
}
);
// there is also a f64 implementation called voxel_traversal_f64
License
Licensed under MIT LICENSE