|
| ScalarHexagonField2 () |
| Empty.
|
|
| ScalarHexagonField2 (const ScalarField2 &) |
| Create the hexagonal field. More...
|
|
| ScalarHexagonField2 (const ScalarField2 &, const double &) |
| Create the hexagonal field. More...
|
|
| ScalarHexagonField2 (const Vector2 &, const double &, int, int, const double &=0.0) |
| Create the field structure. More...
|
|
| ScalarHexagonField2 (const Vector2 &, const double &, int, int, const QVector< double > &) |
| Create the field structure. More...
|
|
| ~ScalarHexagonField2 () |
| Empty.
|
|
void | GetRange (double &, double &) const |
| Get the range of the field. More...
|
|
double | Integral () const |
| Get the integral of the scalar field. More...
|
|
virtual Vector2 | Gradient (int, int) const |
| Compute the gradient at a given sample. More...
|
|
virtual double | Value (int, int) const |
| Return the field gradient at a given array vertex. More...
|
|
virtual double | K () const |
| Compute the Lipschitz constant of the field. More...
|
|
void | CutEpsilon (const double &=1e-6) |
| Set all values in the field that are lower than epsilon to true zero. More...
|
|
double | at (int, int) const |
| Return the field value at a given array vertex. More...
|
|
double | at (const QPoint &) const |
| Return the field value at a given array vertex. More...
|
|
double & | operator() (int, int) |
| Return the field value at a given array vertex. More...
|
|
double & | operator() (const QPoint &) |
| Return the field value at a given array vertex. More...
|
|
double | at (int) const |
| Return the data in the field. More...
|
|
double & | operator[] (int) |
| Return the data in the field. More...
|
|
ScalarField2 | CreateScalarField () const |
| Create a ScalarField2 from the hexagonal field. More...
|
|
ScalarField2 | CreateScalarField (const Box2 &, int, int) const |
| Create a ScalarField2 from the hexagonal field. More...
|
|
virtual double | Value (const Vector2 &) const |
| Get the field value with world coordinate system. More...
|
|
virtual double | BiCubic (const Vector2 &) const |
| Get the field value with world coordinate system. More...
|
|
void | Fill (const double &) |
| Sets the entire field with a constant value. More...
|
|
void | Smooth (const Vector2 &, const double &) |
| Smooth the scalar field within a given region. More...
|
|
void | Flatten (const Vector2 &, const double &, const double &=0.25) |
| Flatten the scalar field. More...
|
|
void | Gaussian (const Vector2 &, const double &, const double &) |
| Add material with gaussian distribution. More...
|
|
void | Smooth () |
| Smooth the scalar field using a discrete gaussian kernel. More...
|
|
void | Smooth (int) |
| Applies several smoothing steps to the scalar field. More...
|
|
void | Blur () |
| Blurs the scalar field. More...
|
|
void | Translate (const Vector2 &) |
| Translate the domain of the scalar field. More...
|
|
void | Scale (const double &) |
| Scale the domain of the scalar field. More...
|
|
void | Normalize () |
| Normalize the values of a scalar field to unit interval. More...
|
|
void | Clamp (const double &, const double &) |
| Clamp the values of a scalar field. More...
|
|
void | Add (const double &) |
| Add a constant to the values the scalar field. More...
|
|
void | Step (const double &, const double &) |
| Perform a linear step over the values of a scalar field. More...
|
|
void | SmoothStep (const double &, const double &, bool=false) |
| Perform a smooth step over the values of a scalar field. More...
|
|
ScalarHexagonField2 | GradientNorm () const |
| Compute the gradient norm scalar field.
|
|
| HexagonArray2 (const Vector2 &, const double &, int, int) |
| Create and array of hexagons. More...
|
|
| HexagonArray2 (const Box2 &, const double &) |
| Create and array of hexagons embedded in a box. More...
|
|
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. More...
|
|
Box2 | GetHexagonBox () const |
| Compute the bounding box of all the hexagons. More...
|
|
Vector2 | CellCenter (int, int) const |
| Compute the center of the hexagonal cell. More...
|
|
void | Translate (const Vector2 &) |
| Translate the array. More...
|
|
Vector2 | ArrayVertex (int, int) const |
| Compute the coordinates of a point on the grid. More...
|
|
constexpr bool | InsideVertexIndex (int, int) const |
| Check if the indexes are within range. More...
|
|
bool | Inside (const Vector2 &) const |
| Check if a point is in the rectangular domain. More...
|
|
Hexagon2 | UnitCell () const |
| Return the geometry of a generic cell. More...
|
|
double | CellArea () const |
| Return the area of a cell. More...
|
|
QPoint | Next (int, int, int) const |
| Compute the index of the neighboring hexagon. More...
|
|
QPoint | Next (const QPoint &, int) const |
| Compute the index of the neighboring hexagon. More...
|
|
void | TriangleInteger (const Vector2 &, int &, int &, double &, double &) const |
| Compute the coordinates of a vertex inside a triangle of the hexagonal grid. More...
|
|
QPoint | TriangleInteger (const Vector2 &) const |
| Compute the coordinates of a vertex inside a triangle of the hexagonal grid. More...
|
|
QRect | VertexIntegerArea (const Box2 &) const |
| Compute the integer coordinates of the vertices embedding a box. More...
|
|
QRect | VertexIntegerArea (const Circle2 &) const |
| Compute the integer coordinates of the vertices embedding a circle. More...
|
|
void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| Draws the hexagon array. More...
|
|
void | DrawCenters (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| Draws the centers of the hexagon grid. More...
|
|
|
constexpr int | VertexIndex (int, int) const |
| Compute the index of a given cell. More...
|
|
void | InverseVertexIndex (int, int &, int &) const |
| Compute the coordinates of a given cell. More...
|
|
QPoint | InverseVertexIndex (int) const |
| Compute the coordinates of a given cell. More...
|
|
bool | InsideCellIndex (int, int) const |
| Check if the indexes are within range. More...
|
|
| Hexagon2 () |
| Empty.
|
|
| Hexagon2 (const Vector2 &, const double &) |
| Create an hexagon. More...
|
|
| Hexagon2 (const double &) |
| Create an hexagon. More...
|
|
void | Translate (const Vector2 &) |
| Translate a hexagon. More...
|
|
void | Scale (const double &) |
| Scale a hexagon. More...
|
|
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. More...
|
|
bool | Intersect (const Hexagon2 &) const |
| Check if two hexagons intersect. More...
|
|
double | R (const Vector2 &) const |
| Compute the squared Euclidean distance to the hexagon. More...
|
|
double | Signed (const Vector2 &) const |
| Compute the signed Euclidean distance to the hexagon. More...
|
|
Vector2 | Normal (const Vector2 &) const |
| Computes the distance vector between a hexagon and a point. More...
|
|
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. More...
|
|
Vector2 | Edge (int) const |
| Return the edge vector connecting vertexes k and k+1. More...
|
|
Vector2 | Vertex (int) const |
| Return the coordinates of the k-th vertex. More...
|
|
Box2 | GetBox () const |
| Compute the bounding box of a hexagon.
|
|
double | Area () const |
| Area of the hexagon.
|
|
double | Perimeter () const |
| Perimeter of the hexagon.
|
|
bool | Intersect (const Circle2 &) const |
| Check the intersection with a circle. More...
|
|
void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| Draws an hexagon. More...
|
|
static int | Sector (const Vector2 &) |
| Compute the sector given an input direction. More...
|
|
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.