GlobeEngine
|
A regular grid is a uniform grid with the same distance between all points of an axis. More...
#include <Grid.h>
Public Member Functions | |
RegularGrid2D () | |
~RegularGrid2D () | |
void | clear () override |
void | create (vmml::Vector2ui _pointcount, vmml::Vector2d _stepsizes) |
Set up a regular grid with origin 0.0, 0.0. More... | |
void | create (const ge::AABB2d &_bound, vmml::Vector2ui _pointcount) |
Set up a regular grid based on a AABB with a specific amount of points. More... | |
void | create (const ge::AABB2d &_bound, vmml::Vector2d _stepsizes) |
Set up a regular grid based on a AABB and _stepsizes in two directions. More... | |
Public Member Functions inherited from ge::Grid2D | |
Grid2D () | |
virtual | ~Grid2D () |
vmml::Vector2ui | getSize () const |
vmml::Vector2d | getMidpoint () const |
const ge::AABB2d & | getAABB () const |
virtual vmml::Vector2ui | getCellIdxForPoint (vmml::Vector2d _point)=0 |
virtual vmml::Vector2i | getCellIdxForBound (vmml::Vector4d _point)=0 |
Additional Inherited Members | |
Protected Attributes inherited from ge::Grid2D | |
ge::AABB2d | bound |
vmml::Vector2ui | sizes |
vmml::Vector2d | midpoint |
A regular grid is a uniform grid with the same distance between all points of an axis.
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from ge::Grid2D.
void ge::RegularGrid2D::create | ( | vmml::Vector2ui | _pointcount, |
vmml::Vector2d | _stepsizes | ||
) |
Set up a regular grid with origin 0.0, 0.0.
_pointcount | amount of points in X and Y direction |
_stepsizes | distances between two points in x and y direction |
void ge::RegularGrid2D::create | ( | const ge::AABB2d & | _bound, |
vmml::Vector2ui | _pointcount | ||
) |
Set up a regular grid based on a AABB with a specific amount of points.
_bound | the bounds in x and y direction |
_pointcount | Amount of points in a certain direction. |
void ge::RegularGrid2D::create | ( | const ge::AABB2d & | _bound, |
vmml::Vector2d | _stepsizes | ||
) |
Set up a regular grid based on a AABB and _stepsizes in two directions.
_bound | the bounds in x and y direction |
_stepsizes | distances between two points per axis. In case the bound coordinates are not a multiple of the stepsize the amount of points is a ceiled value to guarantee that all points are inside the AABB. |