GlobeEngine
ge::RegularGrid2D Class Reference

A regular grid is a uniform grid with the same distance between all points of an axis. More...

#include <Grid.h>

Inheritance diagram for ge::RegularGrid2D:
ge::Grid2D

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::AABB2dgetAABB () 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
 

Detailed Description

A regular grid is a uniform grid with the same distance between all points of an axis.

Constructor & Destructor Documentation

ge::RegularGrid2D::RegularGrid2D ( )
inline
ge::RegularGrid2D::~RegularGrid2D ( )
inline

Member Function Documentation

void ge::RegularGrid2D::clear ( )
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.

Parameters
_pointcountamount of points in X and Y direction
_stepsizesdistances 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.

Parameters
_boundthe bounds in x and y direction
_pointcountAmount 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.

Parameters
_boundthe bounds in x and y direction
_stepsizesdistances 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.

The documentation for this class was generated from the following files: