Medusa  1.1
Coordinate Free Mehless Method implementation
mm::kdtree_internal::PointCloud< vec_t > Struct Template Reference

#include <PointCloud.hpp>

Detailed Description

template<typename vec_t>
struct mm::kdtree_internal::PointCloud< vec_t >

Helper class for KDTree with appropriate accessors containing a set of points.

Definition at line 18 of file PointCloud.hpp.

Public Member Functions

 PointCloud ()=default
 Construct an empty point set. More...
 
 PointCloud (const std::vector< vec_t > &pts)
 Construct from an array of points. More...
 
void setPts (const std::vector< vec_t > &pts)
 Reset contained points. More...
 
int kdtree_get_point_count () const
 Interface requirement: returns number of data points. More...
 
vec_t::scalar_t kdtree_get_pt (const size_t idx, int dim) const
 Interface requirement: returns dim-th coordinate of idx-th point. More...
 
vec_t get (const size_t idx) const
 Access the points. More...
 
void add (const vec_t &p)
 Add a point to the cloud. More...
 
template<class BBOX >
bool kdtree_get_bbox (BBOX &) const
 Comply with the interface. More...
 

Public Attributes

std::vector< vec_t > pts
 Points, contained in the tree. More...
 

Constructor & Destructor Documentation

◆ PointCloud() [1/2]

template<typename vec_t >
mm::kdtree_internal::PointCloud< vec_t >::PointCloud ( )
default

Construct an empty point set.

◆ PointCloud() [2/2]

template<typename vec_t >
mm::kdtree_internal::PointCloud< vec_t >::PointCloud ( const std::vector< vec_t > &  pts)
inline

Construct from an array of points.

Definition at line 25 of file PointCloud.hpp.

Member Function Documentation

◆ add()

template<typename vec_t >
void mm::kdtree_internal::PointCloud< vec_t >::add ( const vec_t &  p)
inline

Add a point to the cloud.

Definition at line 44 of file PointCloud.hpp.

◆ get()

template<typename vec_t >
vec_t mm::kdtree_internal::PointCloud< vec_t >::get ( const size_t  idx) const
inline

Access the points.

Definition at line 41 of file PointCloud.hpp.

◆ kdtree_get_bbox()

template<typename vec_t >
template<class BBOX >
bool mm::kdtree_internal::PointCloud< vec_t >::kdtree_get_bbox ( BBOX &  ) const
inline

Comply with the interface.

Definition at line 48 of file PointCloud.hpp.

◆ kdtree_get_point_count()

template<typename vec_t >
int mm::kdtree_internal::PointCloud< vec_t >::kdtree_get_point_count ( ) const
inline

Interface requirement: returns number of data points.

Definition at line 33 of file PointCloud.hpp.

◆ kdtree_get_pt()

template<typename vec_t >
vec_t::scalar_t mm::kdtree_internal::PointCloud< vec_t >::kdtree_get_pt ( const size_t  idx,
int  dim 
) const
inline

Interface requirement: returns dim-th coordinate of idx-th point.

Definition at line 36 of file PointCloud.hpp.

◆ setPts()

template<typename vec_t >
void mm::kdtree_internal::PointCloud< vec_t >::setPts ( const std::vector< vec_t > &  pts)
inline

Reset contained points.

Definition at line 28 of file PointCloud.hpp.

Member Data Documentation

◆ pts

template<typename vec_t >
std::vector<vec_t> mm::kdtree_internal::PointCloud< vec_t >::pts

Points, contained in the tree.

Definition at line 19 of file PointCloud.hpp.


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