| Crates.io | voxel-traversal |
| lib.rs | voxel-traversal |
| version | 0.3.0 |
| created_at | 2024-06-22 20:22:29.750203+00 |
| updated_at | 2024-12-17 20:46:21.501709+00 |
| description | Traverse through all voxels in a 3d space from a start position to an end position. |
| homepage | |
| repository | https://github.com/ChrisTechs/voxel-traversal |
| max_upload_size | |
| id | 1280672 |
| size | 10,518 |
This is a rust port of https://github.com/francisengelmann/fast_voxel_traversal.
// 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
Licensed under MIT LICENSE