|
|
| ScalarHexagonField2 () |
| | Empty.
|
| |
| | ScalarHexagonField2 (const ScalarField2 &) |
| | Create the hexagonal field.
|
| |
| | ScalarHexagonField2 (const ScalarField2 &, const double &) |
| | Create the hexagonal field.
|
| |
| | ScalarHexagonField2 (const Vector2 &, const double &, int, int, const double &=0.0) |
| | Create the field structure.
|
| |
| | ScalarHexagonField2 (const Vector2 &, const double &, int, int, const QVector< double > &) |
| | Create the field structure.
|
| |
|
| ~ScalarHexagonField2 () |
| | Empty.
|
| |
| void | GetRange (double &, double &) const |
| | Get the range of the field.
|
| |
| double | Integral () const |
| | Get the integral of the scalar field.
|
| |
| virtual Vector2 | Gradient (int, int) const |
| | Compute the gradient at a given sample.
|
| |
| virtual double | Value (int, int) const |
| | Return the field gradient at a given array vertex.
|
| |
| virtual double | K () const |
| | Compute the Lipschitz constant of the field.
|
| |
| void | CutEpsilon (const double &=1e-6) |
| | Set all values in the field that are lower than epsilon to true zero.
|
| |
| double | at (int, int) const |
| | Return the field value at a given array vertex.
|
| |
| double | at (const QPoint &) const |
| | Return the field value at a given array vertex.
|
| |
| double & | operator() (int, int) |
| | Return the field value at a given array vertex.
|
| |
| double & | operator() (const QPoint &) |
| | Return the field value at a given array vertex.
|
| |
| double | at (int) const |
| | Return the data in the field.
|
| |
| double & | operator[] (int) |
| | Return the data in the field.
|
| |
| ScalarField2 | CreateScalarField () const |
| | Create a ScalarField2 from the hexagonal field.
|
| |
| ScalarField2 | CreateScalarField (const Box2 &, int, int) const |
| | Create a ScalarField2 from the hexagonal field.
|
| |
| virtual double | Value (const Vector2 &) const |
| | Get the field value with world coordinate system.
|
| |
| virtual double | BiCubic (const Vector2 &) const |
| | Get the field value with world coordinate system.
|
| |
| void | Fill (const double &) |
| | Sets the entire field with a constant value.
|
| |
| void | Smooth (const Vector2 &, const double &) |
| | Smooth the scalar field within a given region.
|
| |
| void | Flatten (const Vector2 &, const double &, const double &=0.25) |
| | Flatten the scalar field.
|
| |
| void | Gaussian (const Vector2 &, const double &, const double &) |
| | Add material with gaussian distribution.
|
| |
| void | Smooth () |
| | Smooth the scalar field using a discrete gaussian kernel.
|
| |
| void | Smooth (int) |
| | Applies several smoothing steps to the scalar field.
|
| |
| void | Blur () |
| | Blurs the scalar field.
|
| |
| void | Translate (const Vector2 &) |
| | Translate the domain of the scalar field.
|
| |
| void | Scale (const double &) |
| | Scale the domain of the scalar field.
|
| |
| void | Normalize () |
| | Normalize the values of a scalar field to unit interval.
|
| |
| void | Clamp (const double &, const double &) |
| | Clamp the values of a scalar field.
|
| |
| void | Add (const double &) |
| | Add a constant to the values the scalar field.
|
| |
| void | Step (const double &, const double &) |
| | Perform a linear step over the values of a scalar field.
|
| |
| void | SmoothStep (const double &, const double &, bool=false) |
| | Perform a smooth step over the values of a scalar field.
|
| |
|
ScalarHexagonField2 | GradientNorm () const |
| | Compute the gradient norm scalar field.
|
| |
| | HexagonArray2 (const Vector2 &, const double &, int, int) |
| | Create and array of hexagons.
|
| |
| | HexagonArray2 (const Box2 &, const double &) |
| | Create and array of hexagons embedded in a box.
|
| |
|
bool | IsEmpty () const |
| | Detect if the array is empty, i.e., any dimension equal to zero.
|
| |
|
int | GetSizeX () const |
| | Get the vertex size of the array for x axis.
|
| |
|
int | GetSizeY () const |
| | Get the vertex size of the array for y axis.
|
| |
|
int | VertexSize () const |
| | Return the size of the vertex array.
|
| |
| Box2 | GetBox () const |
| | Compute the bounding box of the centroids of the hexagons.
|
| |
| Box2 | GetHexagonBox () const |
| | Compute the bounding box of all the hexagons.
|
| |
| Vector2 | CellCenter (int, int) const |
| | Compute the center of the hexagonal cell.
|
| |
| void | Translate (const Vector2 &) |
| | Translate the array.
|
| |
| Vector2 | ArrayVertex (int, int) const |
| | Compute the coordinates of a point on the grid.
|
| |
| constexpr bool | InsideVertexIndex (int, int) const |
| | Check if the indexes are within range.
|
| |
| bool | Inside (const Vector2 &) const |
| | Check if a point is in the rectangular domain.
|
| |
| Hexagon2 | UnitCell () const |
| | Return the geometry of a generic cell.
|
| |
| double | CellArea () const |
| | Return the area of a cell.
|
| |
| QPoint | Next (int, int, int) const |
| | Compute the index of the neighboring hexagon.
|
| |
| QPoint | Next (const QPoint &, int) const |
| | Compute the index of the neighboring hexagon.
|
| |
| void | TriangleInteger (const Vector2 &, int &, int &, double &, double &) const |
| | Compute the coordinates of a vertex inside a triangle of the hexagonal grid.
|
| |
| QPoint | TriangleInteger (const Vector2 &) const |
| | Compute the coordinates of a vertex inside a triangle of the hexagonal grid.
|
| |
| QRect | VertexIntegerArea (const Box2 &) const |
| | Compute the integer coordinates of the vertices embedding a box.
|
| |
| QRect | VertexIntegerArea (const Circle2 &) const |
| | Compute the integer coordinates of the vertices embedding a circle.
|
| |
| void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draws the hexagon array.
|
| |
| void | DrawCenters (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draws the centers of the hexagon grid.
|
| |
|
| constexpr int | VertexIndex (int, int) const |
| | Compute the index of a given cell.
|
| |
| void | InverseVertexIndex (int, int &, int &) const |
| | Compute the coordinates of a given cell.
|
| |
| QPoint | InverseVertexIndex (int) const |
| | Compute the coordinates of a given cell.
|
| |
| bool | InsideCellIndex (int, int) const |
| | Check if the indexes are within range.
|
| |
|
| 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.
|
| |
| static int | Sector (const Vector2 &) |
| | Compute the sector given an input direction.
|
| |
|
static int | next [6][2] = { {1,0}, {0,1}, {-1,0 }, {-1,-1}, {0,-1}, {1,-1 } } |
| | Array of offsets for computing neighbor indexes.
|
| |
|
static const Vector2 | vertex [6] |
| | Array of vertices.
|
| |
|
static const Vector2 | normal [6] |
| | Array of normal vectors to the edges.
|
| |
|
static const Vector2 | edge [6] |
| | Unit edge vectors.
|
| |
|
static const double | Alpha = sqrt(3.0) / 2.0 |
| | Constant sin(π/6)=√3/2.
|
| |
A base two-dimensional field of real values on a hexagonal grid.