2D version of the Hilbert space-filling curve More...
#include <mitsuba/core/sfcurve.h>
Public Types | |
enum | EDirection { ENorth, EEast, ESouth, EWest } |
typedef TVector2< T > | VectorType |
typedef TPoint2< T > | PointType |
Public Member Functions | |
HilbertCurve2D () | |
Create an empty Hilbert curve. More... | |
void | initialize (const VectorType &size) |
Initialize for the specified 2D size. More... | |
const PointType & | operator[] (size_t idx) const |
Return one of the generated points. More... | |
const std::vector< PointType > & | getPoints () const |
Return a reference to the computed points. More... | |
size_t | getPointCount () const |
Return the total number of points. More... | |
const VectorType & | getSize () const |
Return the size of the underlying 2D rectangle. More... | |
Protected Member Functions | |
void | move (EDirection dir) |
void | generate (int order, EDirection front, EDirection right, EDirection back, EDirection left) |
2D version of the Hilbert space-filling curve
Based on http://voxelizator3d.wordpress.com/
typedef TPoint2<T> mitsuba::HilbertCurve2D< T >::PointType |
typedef TVector2<T> mitsuba::HilbertCurve2D< T >::VectorType |
enum mitsuba::HilbertCurve2D::EDirection |
|
inline |
Create an empty Hilbert curve.
|
inlineprotected |
|
inline |
Return the total number of points.
|
inline |
Return a reference to the computed points.
|
inline |
Return the size of the underlying 2D rectangle.
|
inline |
Initialize for the specified 2D size.
|
inlineprotected |
|
inline |
Return one of the generated points.