|
| | HexagonAlpha2 () |
| | Empty.
|
| |
| | HexagonAlpha2 (const Vector2 &, const double &, const double &=0.0) |
| | Create an oriented hexagon.
|
| |
| | HexagonAlpha2 (const Hexagon2 &, const double &=0.0) |
| | Create an hexagon.
|
| |
| void | Rotate (const double &) |
| | Rotates an hexagon.
|
| |
| Vector2 | Vertex (int) const |
| | Return the coordinates of the k-th vertex.
|
| |
| Box2 | GetBox () const |
| | Compute the (coarse) bounding box of a hexagon.
|
| |
| Box2 | GetTightBox () const |
| | Compute the (tight) bounding box of a hexagon.
|
| |
| void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draws an hexagon.
|
| |
|
| Hexagon2 () |
| | Empty.
|
| |
| | Hexagon2 (const Vector2 &, const double &) |
| | Create an hexagon.
|
| |
| | Hexagon2 (const double &) |
| | Create an hexagon.
|
| |
| void | Translate (const Vector2 &) |
| | Translate a hexagon.
|
| |
| void | Scale (const double &) |
| | Scale a hexagon.
|
| |
|
double | Width () const |
| | Width of the hexagon.
|
| |
|
double | Height () const |
| | Height of the hexagon.
|
| |
| bool | Inside (const Vector2 &) const |
| | Test if a point is inside.
|
| |
| bool | Intersect (const Hexagon2 &) const |
| | Check if two hexagons intersect.
|
| |
| double | R (const Vector2 &) const |
| | Compute the squared Euclidean distance to the hexagon.
|
| |
| double | Signed (const Vector2 &) const |
| | Compute the signed Euclidean distance to the hexagon.
|
| |
| Vector2 | Normal (const Vector2 &) const |
| | Computes the distance vector between a hexagon and a point.
|
| |
|
Vector2 | Center () const |
| | Return the center of the hexagonal cell.
|
| |
|
double | Radius () const |
| | Return the radius of the hexagonal cell.
|
| |
| Vector2 | Radial (int) const |
| | Return the radial vector of the k-th vertex.
|
| |
| Vector2 | Edge (int) const |
| | Return the edge vector connecting vertexes k and k+1.
|
| |
| Vector2 | Vertex (int) const |
| | Return the coordinates of the k-th vertex.
|
| |
|
Box2 | GetBox () const |
| | Compute the bounding box of a hexagon.
|
| |
|
double | Area () const |
| | Area of the hexagon.
|
| |
|
double | Perimeter () const |
| | Perimeter of the hexagon.
|
| |
| Vector2 | RandomInside (Random &=Random::R239) const |
| | Generate a random vector inside the hexagon.
|
| |
| QVector< Vector2 > | Poisson (const double &, int, Random &=Random::R239) const |
| | Compute a Poisson disc distribution inside the hexagon.
|
| |
| bool | Intersect (const Circle2 &) const |
| | Check the intersection with a circle.
|
| |
| void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draws an hexagon.
|
| |
Hexagon with arbitrary orientations.
The reference hexagon is the flat topped hexagon. Pointy topped hexagons can be derived by setting the rotation angle to 30 degrees.