Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
G3D::HaltonSequence Class Reference

Public Member Functions

 HaltonSequence (int xBase, int yBase)
 To be a true Halton sequence, xBase and yBase must be prime, and not equal. More...
 
void next (Point2 &p)
 The next point in the Halton Sequence. More...
 
Point2 next ()
 
void reset ()
 
void trash (int n)
 Throw out the next N terms in the sequence. More...
 

Static Public Member Functions

static float sample (int index, float base)
 Samples the Halton Van der Corput sequence statelessly. More...
 

Static Public Attributes

static const int numPrimes = 46
 Length of primeBases. More...
 
static const float primeBases [numPrimes]
 

Constructor & Destructor Documentation

◆ HaltonSequence()

G3D::HaltonSequence::HaltonSequence ( int  xBase,
int  yBase 
)
inline

To be a true Halton sequence, xBase and yBase must be prime, and not equal.

Member Function Documentation

◆ next() [1/2]

void G3D::HaltonSequence::next ( Point2 p)

The next point in the Halton Sequence.

◆ next() [2/2]

Point2 G3D::HaltonSequence::next ( )
inline

◆ reset()

void G3D::HaltonSequence::reset ( )
inline

◆ sample()

static float G3D::HaltonSequence::sample ( int  index,
float  base 
)
inlinestatic

Samples the Halton Van der Corput sequence statelessly.

Base should be prime. Returns a number on [0, 1]

◆ trash()

void G3D::HaltonSequence::trash ( int  n)
inline

Throw out the next N terms in the sequence.

Member Data Documentation

◆ numPrimes

const int G3D::HaltonSequence::numPrimes = 46
static

Length of primeBases.

◆ primeBases

const float G3D::HaltonSequence::primeBases[numPrimes]
static

documentation generated on Wed Nov 24 2021 08:01:57 using doxygen 1.8.15