Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::HilbertCurve2D< T > Class Template Reference

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 PointTypeoperator[] (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 VectorTypegetSize () 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)
 

Detailed Description

template<typename T>
class mitsuba::HilbertCurve2D< T >

2D version of the Hilbert space-filling curve

Based on http://voxelizator3d.wordpress.com/

Member Typedef Documentation

template<typename T >
typedef TPoint2<T> mitsuba::HilbertCurve2D< T >::PointType
template<typename T >
typedef TVector2<T> mitsuba::HilbertCurve2D< T >::VectorType

Member Enumeration Documentation

template<typename T >
enum mitsuba::HilbertCurve2D::EDirection
Enumerator
ENorth 
EEast 
ESouth 
EWest 

Constructor & Destructor Documentation

template<typename T >
mitsuba::HilbertCurve2D< T >::HilbertCurve2D ( )
inline

Create an empty Hilbert curve.

Member Function Documentation

template<typename T >
void mitsuba::HilbertCurve2D< T >::generate ( int  order,
EDirection  front,
EDirection  right,
EDirection  back,
EDirection  left 
)
inlineprotected
template<typename T >
size_t mitsuba::HilbertCurve2D< T >::getPointCount ( ) const
inline

Return the total number of points.

template<typename T >
const std::vector<PointType>& mitsuba::HilbertCurve2D< T >::getPoints ( ) const
inline

Return a reference to the computed points.

template<typename T >
const VectorType& mitsuba::HilbertCurve2D< T >::getSize ( ) const
inline

Return the size of the underlying 2D rectangle.

template<typename T >
void mitsuba::HilbertCurve2D< T >::initialize ( const VectorType size)
inline

Initialize for the specified 2D size.

template<typename T >
void mitsuba::HilbertCurve2D< T >::move ( EDirection  dir)
inlineprotected
template<typename T >
const PointType& mitsuba::HilbertCurve2D< T >::operator[] ( size_t  idx) const
inline

Return one of the generated points.


The documentation for this class was generated from the following file: