PointGenerator3.hpp
Go to the documentation of this file.
1 // This code is based on Jet framework.
2 // Copyright (c) 2018 Doyub Kim
3 // CubbyFlow is voxel-based fluid simulation engine for computer games.
4 // Copyright (c) 2020 CubbyFlow Team
5 // Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6 // AI Part: Dongheon Cho, Minseo Kim
7 // We are making my contributions/submissions to this project solely in our
8 // personal capacity and are not conveying any rights to any intellectual
9 // property of any third parties.
10 
11 #ifndef CUBBYFLOW_POINT_GENERATOR3_HPP
12 #define CUBBYFLOW_POINT_GENERATOR3_HPP
13 
14 #include <Core/Array/Array.hpp>
16 
17 #include <functional>
18 
19 namespace CubbyFlow
20 {
29 {
30  public:
32  PointGenerator3() = default;
33 
35  PointGenerator3(const PointGenerator3&) = default;
36 
38  PointGenerator3(PointGenerator3&&) noexcept = default;
39 
41  virtual ~PointGenerator3() = default;
42 
44  PointGenerator3& operator=(const PointGenerator3&) = default;
45 
47  PointGenerator3& operator=(PointGenerator3&&) noexcept = default;
48 
51  void Generate(const BoundingBox3D& boundingBox, double spacing,
52  Array1<Vector3D>* points) const;
53 
65  virtual void ForEachPoint(
66  const BoundingBox3D& boundingBox, double spacing,
67  const std::function<bool(const Vector3D&)>& callback) const = 0;
68 };
69 
71 using PointGenerator3Ptr = std::shared_ptr<PointGenerator3>;
72 } // namespace CubbyFlow
73 
74 #endif
PointGenerator3 & operator=(const PointGenerator3 &)=default
Default copy assignment operator.
virtual void ForEachPoint(const BoundingBox3D &boundingBox, double spacing, const std::function< bool(const Vector3D &)> &callback) const =0
Iterates every point within the bounding box with specified point pattern and invokes the callback fu...
std::shared_ptr< PointGenerator3 > PointGenerator3Ptr
Shared pointer for the PointGenerator3 type.
Definition: PointGenerator3.hpp:71
void Generate(const BoundingBox3D &boundingBox, double spacing, Array1< Vector3D > *points) const
N-D axis-aligned bounding box class.
Definition: BoundingBox.hpp:46
PointGenerator3()=default
Default constructor.
virtual ~PointGenerator3()=default
Default virtual destructor.
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
Definition: Array-Impl.hpp:19
Abstract base class for 3-D point generator.
Definition: PointGenerator3.hpp:28