voxel-traversal 0.3.0

Traverse through all voxels in a 3d space from a start position to an end position.
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 10.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ChrisTechs/voxel-traversal
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ChrisTechs

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