A prototype for the implementation of Amanatides & Woo's "A Fast Voxel Traversal Algorithm" in C++. Note, this has not been tested, and is not guaranteed to be bug-free. An overview of the algorithm can be found here.
- Instead of using
double
orfloat
, I've decided to usevalue_type
which can be set to a user-specified type inVec3.h
. - An optional enhancement that can be done is calculating the ray's inverse direction upon construction of the ray. This will ensure inverse direction is calculated only once per ray.