Core 1.0
InfiniteArray Class Reference

Virtual infinite grid. More...

#include <voronoise.h>

Inheritance diagram for InfiniteArray:
CellularNoise VoroNoise

Public Member Functions

Vector2 CellVertex (int, int) const
 Compute a random point in a cell.
 
Vector CellVertex (int, int, int) const
 Compute point in a cell.
 

Protected Member Functions

 InfiniteArray ()
 Constructor.
 
void Square (const Vector2 &, int &, int &) const
 Compute the cubic cell coordinates.
 
void Square (const Vector2 &, int &, int &, double &, double &) const
 Compute the local coordinates inside a cubic cell.
 
void Square (const Vector &, int &, int &, int &) const
 Compute the cubic cell coordinates.
 
void Square (const Vector &, int &, int &, int &, double &, double &, double &) const
 Compute the local coordinates inside a cubic cell.
 

Protected Attributes

unsigned int o = 0
 Random offset.
 

Static Protected Attributes

static RandomFast random
 Fast random number generator.
 

Detailed Description

Virtual infinite grid.

This class provides member for computing grid cells and local coordinates of points inside a cell.

Member Function Documentation

◆ CellVertex() [1/2]

Vector2 InfiniteArray::CellVertex ( int i,
int j ) const

Compute a random point in a cell.

Returns
The point coordinates.
Parameters
i,jInteger coordinates of the cell.

◆ CellVertex() [2/2]

Vector InfiniteArray::CellVertex ( int i,
int j,
int k ) const

Compute point in a cell.

Returns
The local coordinates.
Parameters
i,j,kInteger coordinates of the cell.

◆ Square() [1/4]

void InfiniteArray::Square ( const Vector & p,
int & x,
int & y,
int & z ) const
inlineprotected

Compute the cubic cell coordinates.

Parameters
pPoint.
x,y,zReturned integer coordinates.

◆ Square() [2/4]

void InfiniteArray::Square ( const Vector & p,
int & x,
int & y,
int & z,
double & u,
double & v,
double & w ) const
inlineprotected

Compute the local coordinates inside a cubic cell.

Parameters
pPoint.
x,y,zReturned integer coordinates.
u,v,wReturned local coordinates.

◆ Square() [3/4]

void InfiniteArray::Square ( const Vector2 & p,
int & x,
int & y ) const
inlineprotected

Compute the cubic cell coordinates.

Parameters
pPoint.
x,yReturned integer coordinates.
See also
InfiniteArray::Square(const Vector2& , int& , int& , double& , double& ) const

◆ Square() [4/4]

void InfiniteArray::Square ( const Vector2 & p,
int & x,
int & y,
double & u,
double & v ) const
inlineprotected

Compute the local coordinates inside a cubic cell.

Parameters
pPoint.
x,yReturned integer coordinates.
u,vReturned local coordinates.