BioDynaMo  v1.05.119-a4ff3934
Public Types | Public Member Functions | Public Attributes | List of all members
bdm::NanoFlannAdapter Struct Reference

#include <kd_tree_environment.h>

Collaboration diagram for bdm::NanoFlannAdapter:
[legend]

Public Types

using coord_t = Real3
 
using idx_t = uint64_t
 

Public Member Functions

 NanoFlannAdapter ()
 
size_t kdtree_get_point_count () const
 Must return the number of data points. More...
 
real_t kdtree_distance (const coord_t &p1, const idx_t idx_p2, size_t) const
 
real_t kdtree_get_pt (const idx_t idx, int dim) const
 
template<class BBOX >
bool kdtree_get_bbox (BBOX &) const
 

Public Attributes

AgentFlatIdxMap flat_idx_map_
 
ResourceManagerrm_ = nullptr
 

Detailed Description

Definition at line 25 of file kd_tree_environment.h.

Member Typedef Documentation

◆ coord_t

Definition at line 26 of file kd_tree_environment.h.

◆ idx_t

using bdm::NanoFlannAdapter::idx_t = uint64_t

Definition at line 27 of file kd_tree_environment.h.

Constructor & Destructor Documentation

◆ NanoFlannAdapter()

bdm::NanoFlannAdapter::NanoFlannAdapter ( )
inline

Definition at line 29 of file kd_tree_environment.h.

Member Function Documentation

◆ kdtree_distance()

real_t bdm::NanoFlannAdapter::kdtree_distance ( const coord_t p1,
const idx_t  idx_p2,
size_t   
) const
inline

Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored in the class:

Definition at line 38 of file kd_tree_environment.h.

◆ kdtree_get_bbox()

template<class BBOX >
bool bdm::NanoFlannAdapter::kdtree_get_bbox ( BBOX &  ) const
inline

Optional bounding-box computation: return false to default to a standard bbox computation loop. Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again. Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds)

Definition at line 62 of file kd_tree_environment.h.

◆ kdtree_get_point_count()

size_t bdm::NanoFlannAdapter::kdtree_get_point_count ( ) const
inline

Must return the number of data points.

Definition at line 32 of file kd_tree_environment.h.

◆ kdtree_get_pt()

real_t bdm::NanoFlannAdapter::kdtree_get_pt ( const idx_t  idx,
int  dim 
) const
inline

Returns the dim'th component of the idx'th point in the class: Since this is inlined and the "dim" argument is typically an immediate value, the "if/else's" are actually solved at compile time.

Definition at line 48 of file kd_tree_environment.h.

Member Data Documentation

◆ flat_idx_map_

AgentFlatIdxMap bdm::NanoFlannAdapter::flat_idx_map_

Definition at line 66 of file kd_tree_environment.h.

◆ rm_

ResourceManager* bdm::NanoFlannAdapter::rm_ = nullptr

Definition at line 67 of file kd_tree_environment.h.


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