PointGenerator2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: PointGenerator2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for 2-D point generator.
6 > Created Time: 2017/06/02
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_POINT_GENERATOR2_H
10 #define CUBBYFLOW_POINT_GENERATOR2_H
11 
12 #include <Core/Array/Array1.h>
14 
15 #include <functional>
16 
17 namespace CubbyFlow
18 {
27  {
28  public:
30 
31  virtual ~PointGenerator2();
32 
35  void Generate(const BoundingBox2D& boundingBox, double spacing, Array1<Vector2D>* points) const;
36 
48  virtual void ForEachPoint(const BoundingBox2D& boundingBox, double spacing,
49  const std::function<bool(const Vector2D&)>& callback) const = 0;
50  };
51 
53  using PointGenerator2Ptr = std::shared_ptr<PointGenerator2>;
54 }
55 
56 #endif
1-D array class.
Definition: Array1.h:29
Abstract base class for 2-D point generator.
Definition: PointGenerator2.h:26
2-D axis-aligned bounding box class.
Definition: BoundingBox2.h:44
Definition: pybind11Utils.h:24
void Generate(const BoundingBox2D &boundingBox, double spacing, Array1< Vector2D > *points) const
2-D vector class.
Definition: Vector2.h:26
std::shared_ptr< PointGenerator2 > PointGenerator2Ptr
Shared pointer for the PointGenerator2 type.
Definition: PointGenerator2.h:53
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 fu...