Jet
v1.3.3
|
Simple ad-hoc 2-D point searcher. More...
#include <jet/point_simple_list_searcher2.h>
Classes | |
class | Builder |
Front-end to create PointSimpleListSearcher2 objects step by step. More... | |
Public Member Functions | |
PointSimpleListSearcher2 () | |
Default constructor. More... | |
PointSimpleListSearcher2 (const PointSimpleListSearcher2 &other) | |
Copy constructor. More... | |
void | build (const ConstArrayAccessor1< Vector2D > &points) override |
Builds internal structure for given points list. More... | |
void | forEachNearbyPoint (const Vector2D &origin, double radius, const ForEachNearbyPointFunc &callback) const override |
bool | hasNearbyPoint (const Vector2D &origin, double radius) const override |
PointNeighborSearcher2Ptr | clone () const override |
Creates a new instance of the object with same properties than original. More... | |
PointSimpleListSearcher2 & | operator= (const PointSimpleListSearcher2 &other) |
Assignment operator. More... | |
void | set (const PointSimpleListSearcher2 &other) |
Copy from the other instance. More... | |
void | serialize (std::vector< uint8_t > *buffer) const override |
Serializes the neighbor searcher into the buffer. More... | |
void | deserialize (const std::vector< uint8_t > &buffer) override |
Deserializes the neighbor searcher from the buffer. More... | |
![]() | |
PointNeighborSearcher2 () | |
Default constructor. More... | |
virtual | ~PointNeighborSearcher2 () |
Destructor. More... | |
virtual std::string | typeName () const =0 |
Returns the type name of the derived class. More... | |
![]() | |
Serializable ()=default | |
virtual | ~Serializable ()=default |
Static Public Member Functions | |
static Builder | builder () |
Returns builder fox PointSimpleListSearcher2. More... | |
Additional Inherited Members | |
![]() | |
typedef std::function< void(size_t, const Vector2D &)> | ForEachNearbyPointFunc |
Simple ad-hoc 2-D point searcher.
This class implements 2-D point searcher simply by looking up every point in the list. Thus, this class is not ideal for searches involing large number of points, but only for small set of items.
jet::PointSimpleListSearcher2::PointSimpleListSearcher2 | ( | ) |
Default constructor.
jet::PointSimpleListSearcher2::PointSimpleListSearcher2 | ( | const PointSimpleListSearcher2 & | other | ) |
Copy constructor.
|
overridevirtual |
Builds internal structure for given points list.
For this class, this function simply copies the given point list to the internal list.
[in] | points | The points to search. |
Implements jet::PointNeighborSearcher2.
|
static |
Returns builder fox PointSimpleListSearcher2.
|
overridevirtual |
Creates a new instance of the object with same properties than original.
Implements jet::PointNeighborSearcher2.
|
overridevirtual |
Deserializes the neighbor searcher from the buffer.
Implements jet::Serializable.
|
overridevirtual |
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. |
Implements jet::PointNeighborSearcher2.
|
overridevirtual |
Returns true if there are any nearby points for given origin within radius.
[in] | origin | The origin. |
[in] | radius | The radius. |
Implements jet::PointNeighborSearcher2.
PointSimpleListSearcher2& jet::PointSimpleListSearcher2::operator= | ( | const PointSimpleListSearcher2 & | other | ) |
Assignment operator.
|
overridevirtual |
Serializes the neighbor searcher into the buffer.
Implements jet::Serializable.
void jet::PointSimpleListSearcher2::set | ( | const PointSimpleListSearcher2 & | other | ) |
Copy from the other instance.