Jet
v1.3.3
|
Abstract base class for 2-D neighbor point searcher. More...
#include <jet/point_neighbor_searcher2.h>
Public Types | |
typedef std::function< void(size_t, const Vector2D &)> | ForEachNearbyPointFunc |
Public Member Functions | |
PointNeighborSearcher2 () | |
Default constructor. More... | |
virtual | ~PointNeighborSearcher2 () |
Destructor. More... | |
virtual std::string | typeName () const =0 |
Returns the type name of the derived class. More... | |
virtual void | build (const ConstArrayAccessor1< Vector2D > &points)=0 |
Builds internal acceleration structure for given points list. More... | |
virtual void | forEachNearbyPoint (const Vector2D &origin, double radius, const ForEachNearbyPointFunc &callback) const =0 |
virtual bool | hasNearbyPoint (const Vector2D &origin, double radius) const =0 |
virtual std::shared_ptr< PointNeighborSearcher2 > | clone () const =0 |
Creates a new instance of the object with same properties than original. More... | |
![]() | |
Serializable ()=default | |
virtual | ~Serializable ()=default |
virtual void | serialize (std::vector< uint8_t > *buffer) const =0 |
Serializes this instance into the flat buffer. More... | |
virtual void | deserialize (const std::vector< uint8_t > &buffer)=0 |
Deserializes this instance from the flat buffer. More... | |
Abstract base class for 2-D neighbor point searcher.
This class provides interface for 2-D neighbor point searcher. For given list of points, the class builds internal cache to accelerate the search. Once built, the data structure is used to search nearby points for given origin point.
typedef std::function<void(size_t, const Vector2D&)> jet::PointNeighborSearcher2::ForEachNearbyPointFunc |
Callback function for nearby search query. The first parameter is the index of the nearby point, and the second is the position of the point.
jet::PointNeighborSearcher2::PointNeighborSearcher2 | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
pure virtual |
Builds internal acceleration structure for given points list.
Implemented in jet::PointParallelHashGridSearcher2, jet::PointHashGridSearcher2, jet::PointSimpleListSearcher2, and jet::PointKdTreeSearcher2.
|
pure virtual |
Creates a new instance of the object with same properties than original.
Implemented in jet::PointParallelHashGridSearcher2, jet::PointHashGridSearcher2, jet::PointSimpleListSearcher2, and jet::PointKdTreeSearcher2.
|
pure virtual |
Invokes the callback function for each nearby point around the origin within given radius.
[in] | origin | The origin position. |
[in] | radius | The search radius. |
[in] | callback | The callback function. |
Implemented in jet::PointParallelHashGridSearcher2, jet::PointHashGridSearcher2, jet::PointSimpleListSearcher2, and jet::PointKdTreeSearcher2.
|
pure virtual |
Returns true if there are any nearby points for given origin within radius.
[in] | origin | The origin. |
[in] | radius | The radius. |
Implemented in jet::PointParallelHashGridSearcher2, jet::PointHashGridSearcher2, jet::PointSimpleListSearcher2, and jet::PointKdTreeSearcher2.
|
pure virtual |
Returns the type name of the derived class.