CubbyFlow::PointGenerator2 Class Referenceabstract

Abstract base class for 2-D point generator. More...

#include <Core/PointGenerator/PointGenerator2.hpp>

Inheritance diagram for CubbyFlow::PointGenerator2:
CubbyFlow::GridPointGenerator2 CubbyFlow::TrianglePointGenerator

Public Member Functions

 PointGenerator2 ()=default
 Default constructor. More...
 
 PointGenerator2 (const PointGenerator2 &)=default
 Default copy constructor. More...
 
 PointGenerator2 (PointGenerator2 &&) noexcept=default
 Default move constructor. More...
 
virtual ~PointGenerator2 ()=default
 Default virtual destructor. More...
 
PointGenerator2operator= (const PointGenerator2 &)=default
 Default copy assignment operator. More...
 
PointGenerator2operator= (PointGenerator2 &&) noexcept=default
 Default move assignment operator. More...
 
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() [1/3]

CubbyFlow::PointGenerator2::PointGenerator2 ( )
default

Default constructor.

◆ PointGenerator2() [2/3]

CubbyFlow::PointGenerator2::PointGenerator2 ( const PointGenerator2 )
default

Default copy constructor.

◆ PointGenerator2() [3/3]

CubbyFlow::PointGenerator2::PointGenerator2 ( PointGenerator2 &&  )
defaultnoexcept

Default move constructor.

◆ ~PointGenerator2()

virtual CubbyFlow::PointGenerator2::~PointGenerator2 ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ ForEachPoint()

virtual void CubbyFlow::PointGenerator2::ForEachPoint ( const BoundingBox2D boundingBox,
double  spacing,
const std::function< bool(const Vector2D &)> &  callback 
) const
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.

◆ operator=() [1/2]

PointGenerator2& CubbyFlow::PointGenerator2::operator= ( const PointGenerator2 )
default

Default copy assignment operator.

◆ operator=() [2/2]

PointGenerator2& CubbyFlow::PointGenerator2::operator= ( PointGenerator2 &&  )
defaultnoexcept

Default move assignment operator.


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