Jet  v1.3.3
point_neighbor_searcher3.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_NEIGHBOR_SEARCHER3_H_
8 #define INCLUDE_JET_POINT_NEIGHBOR_SEARCHER3_H_
9 
10 #include <jet/array_accessor1.h>
11 #include <jet/serialization.h>
12 #include <jet/vector3.h>
13 #include <functional>
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 namespace jet {
19 
29  public:
32  typedef std::function<void(size_t, const Vector3D&)>
34 
37 
40 
42  virtual std::string typeName() const = 0;
43 
45  virtual void build(const ConstArrayAccessor1<Vector3D>& points) = 0;
46 
55  virtual void forEachNearbyPoint(
56  const Vector3D& origin,
57  double radius,
58  const ForEachNearbyPointFunc& callback) const = 0;
59 
69  virtual bool hasNearbyPoint(
70  const Vector3D& origin, double radius) const = 0;
71 
78  virtual std::shared_ptr<PointNeighborSearcher3> clone() const = 0;
79 };
80 
82 typedef std::shared_ptr<PointNeighborSearcher3> PointNeighborSearcher3Ptr;
83 
86  public:
89 };
90 
92 typedef std::shared_ptr<PointNeighborSearcherBuilder3>
94 
95 #define JET_NEIGHBOR_SEARCHER3_TYPE_NAME(DerivedClassName) \
96  std::string typeName() const override { \
97  return #DerivedClassName; \
98  }
99 
100 } // namespace jet
101 
102 #endif // INCLUDE_JET_POINT_NEIGHBOR_SEARCHER3_H_
103 
jet::PointNeighborSearcher3::~PointNeighborSearcher3
virtual ~PointNeighborSearcher3()
Destructor.
jet::PointNeighborSearcherBuilder3Ptr
std::shared_ptr< PointNeighborSearcherBuilder3 > PointNeighborSearcherBuilder3Ptr
Shared pointer for the PointNeighborSearcherBuilder3 type.
Definition: point_neighbor_searcher3.h:93
jet::ConstArrayAccessor< T, 1 >
1-D read-only array accessor class.
Definition: array_accessor1.h:184
jet::PointNeighborSearcher3::hasNearbyPoint
virtual bool hasNearbyPoint(const Vector3D &origin, double radius) const =0
jet::PointNeighborSearcher3::forEachNearbyPoint
virtual void forEachNearbyPoint(const Vector3D &origin, double radius, const ForEachNearbyPointFunc &callback) const =0
jet::PointNeighborSearcher3::PointNeighborSearcher3
PointNeighborSearcher3()
Default constructor.
jet::PointNeighborSearcher3::build
virtual void build(const ConstArrayAccessor1< Vector3D > &points)=0
Builds internal acceleration structure for given points list.
jet
Definition: advection_solver2.h:18
jet::PointNeighborSearcher3::typeName
virtual std::string typeName() const =0
Returns the type name of the derived class.
jet::PointNeighborSearcher3
Abstract base class for 3-D neighbor point searcher.
Definition: point_neighbor_searcher3.h:28
jet::PointNeighborSearcher3::ForEachNearbyPointFunc
std::function< void(size_t, const Vector3D &)> ForEachNearbyPointFunc
Definition: point_neighbor_searcher3.h:33
jet::PointNeighborSearcherBuilder3::buildPointNeighborSearcher
virtual PointNeighborSearcher3Ptr buildPointNeighborSearcher() const =0
Returns shared pointer of PointNeighborSearcher3 type.
jet::PointNeighborSearcher3Ptr
std::shared_ptr< PointNeighborSearcher3 > PointNeighborSearcher3Ptr
Shared pointer for the PointNeighborSearcher3 type.
Definition: point_neighbor_searcher3.h:82
vector3.h
jet::Serializable
Abstract base class for any serializable class.
Definition: serialization.h:17
jet::Vector< T, 3 >
3-D vector class.
Definition: vector3.h:25
array_accessor1.h
serialization.h
jet::PointNeighborSearcherBuilder3
Abstract base class for 3-D point neighbor searcher builders.
Definition: point_neighbor_searcher3.h:85
jet::PointNeighborSearcher3::clone
virtual std::shared_ptr< PointNeighborSearcher3 > clone() const =0
Creates a new instance of the object with same properties than original.