Jet  v1.3.3
point_generator2.h
Go to the documentation of this file.
1 // Copyright (c) 2018 Doyub Kim
2 //
3 // I am making my contributions/submissions to this project solely in my
4 // personal capacity and am not conveying any rights to any intellectual
5 // property of any third parties.
6 
7 #ifndef INCLUDE_JET_POINT_GENERATOR2_H_
8 #define INCLUDE_JET_POINT_GENERATOR2_H_
9 
10 #include <jet/array1.h>
11 #include <jet/bounding_box2.h>
12 
13 #include <functional>
14 #include <memory>
15 
16 namespace jet {
17 
26  public:
28 
29  virtual ~PointGenerator2();
30 
33  void generate(
34  const BoundingBox2D& boundingBox,
35  double spacing,
36  Array1<Vector2D>* points) const;
37 
49  virtual void forEachPoint(
50  const BoundingBox2D& boundingBox,
51  double spacing,
52  const std::function<bool(const Vector2D&)>& callback) const = 0;
53 };
54 
56 typedef std::shared_ptr<PointGenerator2> PointGenerator2Ptr;
57 
58 } // namespace jet
59 
60 #endif // INCLUDE_JET_POINT_GENERATOR2_H_
jet::Array< T, 1 >
1-D array class.
Definition: array1.h:31
jet::PointGenerator2::~PointGenerator2
virtual ~PointGenerator2()
jet::PointGenerator2::forEachPoint
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...
jet::PointGenerator2
Abstract base class for 2-D point generator.
Definition: point_generator2.h:25
jet
Definition: advection_solver2.h:18
jet::Vector< T, 2 >
2-D vector class.
Definition: vector2.h:24
bounding_box2.h
jet::BoundingBox< T, 2 >
2-D axis-aligned bounding box class.
Definition: bounding_box2.h:41
jet::PointGenerator2::PointGenerator2
PointGenerator2()
jet::PointGenerator2Ptr
std::shared_ptr< PointGenerator2 > PointGenerator2Ptr
Shared pointer for the PointGenerator2 type.
Definition: point_generator2.h:56
jet::PointGenerator2::generate
void generate(const BoundingBox2D &boundingBox, double spacing, Array1< Vector2D > *points) const
array1.h