This class implements a Poisson disc tile structure with topological information between discs, with various generation algorithms.
More...
|
| Vector2 | NextVertex (int, int) const |
| | Return the position of the j-th vertex linked to vertex i.
|
| QPoint | Next (int, int) const |
| | Return the indexes defining the j-th vertex linked to vertex i.
|
| int | Valence (int) const |
| | Return the valence of the disc.
|
|
QString | GetCode () const |
| | Get the code of the tile.
|
|
int | Memory () const |
| | Get the code of the tile.
|
| | DiscTile () |
| | Empty.
|
| | DiscTile (const double &, const double &, const QVector< Vector2 > &) |
| | Create a Poisson disc sampling over a square domain.
|
| | DiscTile (const double &, const double &, int, Random &=Random::R239) |
| | Create a poisson sampling in a square domain.
|
| | DiscTile (const double &, const double &, int, const QVector< Vector2 > &, Random &=Random::R239) |
| | Create a poisson sampling in a square domain.
|
|
| ~DiscTile () |
| | Empty.
|
| void | Relaxation (const double &=1.0/4.0) |
| | Perform a relaxation step over the Poisson-Disc distribution.
|
| void | Relaxation (int, const double &=1.0/4.0) |
| | Perform a relaxation step over the Poisson-Disc distribution.
|
| void | Scramble () |
| | Scramble the points inside the generated tile.
|
| void | Draw (QGraphicsScene &) const |
| | Draw the distribution.
|
|
Box2 | GetBox () const |
| | Return the box.
|
|
double | Radius () const |
| | Return the radius.
|
| Vector2 | Vertex (int) const |
| | Getter on the i-th sample.
|
| Vector2 | Vertex (int, int, int) const |
| | Compute the i-th sample for a displaced tile.
|
| Vector2 | Vertex (const QPoint &, int) const |
| | Compute the i-th sample for a displaced tile.
|
|
const QVector< Vector2 > | GetSet () const |
| | Return the vector containing the samples.
|
|
int | Size () const |
| | Return the number of samples.
|
| void | Scale (const double &) |
| | Scale a disc tile.
|
| QVector< Vector2 > | Sample (const Box2 &, double(*)(const Vector2 &)) const |
| | Sample a domain according to an input importance function.
|
| QVector< Vector2 > | Sample (const ScalarField2 &) const |
| | Sample a domain according to an input importance function.
|
| QVector< Vector2 > | Sample (const Box2 &) const |
| | Sample a domain according to an input importance function.
|
| double | Packing () const |
| | Compute the packing density.
|
|
QString | GetCode () const |
| | Get the code of the tile.
|
|
int | Memory () const |
| | Get the code of the tile.
|
|
|
static const QPoint | next [9] = { QPoint(1,0),QPoint(1,1),QPoint(0,1),QPoint(-1,1),QPoint(-1,0),QPoint(-1,-1),QPoint(0,-1),QPoint(1,-1),QPoint(0,0) } |
| | Neigboring cells, including self.
|
|
static const Vector2 | nextvector [9] = { Vector2(1,0), Vector2(1,1),Vector2(0,1),Vector2(-1,1),Vector2(-1,0),Vector2(-1,-1),Vector2(0,-1),Vector2(1,-1),Vector2(0,0) } |
| | Offset vectors for neigboring cells, including self.
|
This class implements a Poisson disc tile structure with topological information between discs, with various generation algorithms.