Abstract base class for 2-D point generator. More...
#include <Core/PointGenerator/PointGenerator2.h>
Public Member Functions | |
PointGenerator2 () | |
virtual | ~PointGenerator2 () |
void | Generate (const BoundingBox2D &boundingBox, double spacing, Array1< Vector2D > *points) const |
virtual void | ForEachPoint (const BoundingBox2D &boundingBox, double spacing, const std::function< bool(const Vector2D &)> &callback) const =0 |
Iterates every point within the bounding box with specified point pattern and invokes the callback function. More... | |
Detailed Description
Abstract base class for 2-D point generator.
This class provides interface for 2-D point generator. For given bounding box and point spacing, the inherited classes generates points with specified pattern.
Constructor & Destructor Documentation
◆ PointGenerator2()
CubbyFlow::PointGenerator2::PointGenerator2 | ( | ) |
◆ ~PointGenerator2()
|
virtual |
Member Function Documentation
◆ ForEachPoint()
|
pure virtual |
Iterates every point within the bounding box with specified point pattern and invokes the callback function.
This function iterates every point within the bounding box and invokes the callback function. The position of the point is specified by the actual implementation. The suggested spacing between the points are given by spacing
. The input parameter of the callback function is the position of the point and the return value tells whether the iteration should stop or not.
Implemented in CubbyFlow::GridPointGenerator2, and CubbyFlow::TrianglePointGenerator.
◆ Generate()
void CubbyFlow::PointGenerator2::Generate | ( | const BoundingBox2D & | boundingBox, |
double | spacing, | ||
Array1< Vector2D > * | points | ||
) | const |
Generates points to output array points
inside given boundingBox
with target point spacing
.
The documentation for this class was generated from the following file:
- Core/PointGenerator/PointGenerator2.h