Jet  v1.3.3
Public Types | Public Member Functions | List of all members
jet::PointNeighborSearcher3 Class Referenceabstract

Abstract base class for 3-D neighbor point searcher. More...

#include <jet/point_neighbor_searcher3.h>

Inheritance diagram for jet::PointNeighborSearcher3:
jet::Serializable jet::PointHashGridSearcher3 jet::PointKdTreeSearcher3 jet::PointParallelHashGridSearcher3 jet::PointSimpleListSearcher3

Public Types

typedef std::function< void(size_t, const Vector3D &)> ForEachNearbyPointFunc
 

Public Member Functions

 PointNeighborSearcher3 ()
 Default constructor. More...
 
virtual ~PointNeighborSearcher3 ()
 Destructor. More...
 
virtual std::string typeName () const =0
 Returns the type name of the derived class. More...
 
virtual void build (const ConstArrayAccessor1< Vector3D > &points)=0
 Builds internal acceleration structure for given points list. More...
 
virtual void forEachNearbyPoint (const Vector3D &origin, double radius, const ForEachNearbyPointFunc &callback) const =0
 
virtual bool hasNearbyPoint (const Vector3D &origin, double radius) const =0
 
virtual std::shared_ptr< PointNeighborSearcher3clone () const =0
 Creates a new instance of the object with same properties than original. More...
 
- Public Member Functions inherited from jet::Serializable
 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...
 

Detailed Description

Abstract base class for 3-D neighbor point searcher.

This class provides interface for 3-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.

Member Typedef Documentation

◆ ForEachNearbyPointFunc

typedef std::function<void(size_t, const Vector3D&)> jet::PointNeighborSearcher3::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.

Constructor & Destructor Documentation

◆ PointNeighborSearcher3()

jet::PointNeighborSearcher3::PointNeighborSearcher3 ( )

Default constructor.

◆ ~PointNeighborSearcher3()

virtual jet::PointNeighborSearcher3::~PointNeighborSearcher3 ( )
virtual

Destructor.

Member Function Documentation

◆ build()

virtual void jet::PointNeighborSearcher3::build ( const ConstArrayAccessor1< Vector3D > &  points)
pure virtual

Builds internal acceleration structure for given points list.

Implemented in jet::PointParallelHashGridSearcher3, jet::PointHashGridSearcher3, jet::PointSimpleListSearcher3, and jet::PointKdTreeSearcher3.

◆ clone()

virtual std::shared_ptr<PointNeighborSearcher3> jet::PointNeighborSearcher3::clone ( ) const
pure virtual

Creates a new instance of the object with same properties than original.

Returns
Copy of this object.

Implemented in jet::PointParallelHashGridSearcher3, jet::PointHashGridSearcher3, jet::PointSimpleListSearcher3, and jet::PointKdTreeSearcher3.

◆ forEachNearbyPoint()

virtual void jet::PointNeighborSearcher3::forEachNearbyPoint ( const Vector3D origin,
double  radius,
const ForEachNearbyPointFunc callback 
) const
pure virtual

Invokes the callback function for each nearby point around the origin within given radius.

Parameters
[in]originThe origin position.
[in]radiusThe search radius.
[in]callbackThe callback function.

Implemented in jet::PointParallelHashGridSearcher3, jet::PointHashGridSearcher3, jet::PointSimpleListSearcher3, and jet::PointKdTreeSearcher3.

◆ hasNearbyPoint()

virtual bool jet::PointNeighborSearcher3::hasNearbyPoint ( const Vector3D origin,
double  radius 
) const
pure virtual

Returns true if there are any nearby points for given origin within radius.

Parameters
[in]originThe origin.
[in]radiusThe radius.
Returns
True if has nearby point, false otherwise.

Implemented in jet::PointParallelHashGridSearcher3, jet::PointHashGridSearcher3, jet::PointSimpleListSearcher3, and jet::PointKdTreeSearcher3.

◆ typeName()

virtual std::string jet::PointNeighborSearcher3::typeName ( ) const
pure virtual

Returns the type name of the derived class.


The documentation for this class was generated from the following file: