GlobeEngine
ge::CartesianGrid2D Class Reference

A cartesian grid is a uniform grid having the same distance between all points in all axis directions. More...

#include <Grid.h>

Inheritance diagram for ge::CartesianGrid2D:
ge::Grid2D

Public Member Functions

 CartesianGrid2D ()
 
 ~CartesianGrid2D ()
 
void clear () override
 
void create (vmml::Vector2ui _pointCounts, double _stepsize)
 Set up a cartesian grid with origin 0.0, 0.0. More...
 
void create (const ge::AABB2d &_bound, vmml::Vector2ui _pointCounts)
 Set up a cartesian grid based on a AABB with a specific amount of points. More...
 
void create (const ge::AABB2d &_bound, double _stepsize)
 Set up a cartesian grid based on a AABB. 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 cartesian grid is a uniform grid having the same distance between all points in all axis directions.

Constructor & Destructor Documentation

ge::CartesianGrid2D::CartesianGrid2D ( )
ge::CartesianGrid2D::~CartesianGrid2D ( )
inline

Member Function Documentation

void ge::CartesianGrid2D::clear ( )
overridevirtual

Reimplemented from ge::Grid2D.

void ge::CartesianGrid2D::create ( vmml::Vector2ui  _pointCounts,
double  _stepsize 
)

Set up a cartesian grid with origin 0.0, 0.0.

Parameters
_pointCountsamount of points in X and Y direction
_stepsizedistance between two points
void ge::CartesianGrid2D::create ( const ge::AABB2d _bound,
vmml::Vector2ui  _pointCounts 
)

Set up a cartesian grid based on a AABB with a specific amount of points.

Parameters
_boundthe bounds in x and y direction
_pointCountsAmount of points in a certain direction. The stepsize is calculated based on the bound in x direction and the amount of point in x direction.
void ge::CartesianGrid2D::create ( const ge::AABB2d _bound,
double  _stepsize 
)

Set up a cartesian grid based on a AABB.

Parameters
_boundthe bounds in x and y direction
_stepsizedistance between two points. 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 bound.

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