SAGA API v9.10
Loading...
Searching...
No Matches
CSG_KDTree_3D Class Reference

#include <shapes.h>

Inheritance diagram for CSG_KDTree_3D:
CSG_KDTree

Public Member Functions

 CSG_KDTree_3D (void)
virtual ~CSG_KDTree_3D (void)
 CSG_KDTree_3D (CSG_Shapes *pPoints, int Field=-1, int zField=-1, double zScale=1.)
bool Create (CSG_Shapes *pPoints, int Field=-1, int zField=-1, double zScale=1.)
 CSG_KDTree_3D (CSG_PointCloud *pPoints)
bool Create (CSG_PointCloud *pPoints)
 CSG_KDTree_3D (const CSG_Matrix &Points)
bool Create (const CSG_Matrix &Points)
 CSG_KDTree_3D (const double **Points, size_t nPoints)
bool Create (const double **Points, size_t nPoints)
virtual bool Destroy (void)
virtual double Get_Point_Value (size_t i) const
virtual size_t Get_Nearest_Points (double Coordinate[3], size_t Count, double Radius)
virtual size_t Get_Nearest_Points (double Coordinate[3], size_t Count, size_t *Indices, double *Distances)
virtual size_t Get_Nearest_Points (double Coordinate[3], size_t Count, double Radius, CSG_Array_sLong &Indices, CSG_Vector &Distances)
virtual bool Get_Nearest_Point (double Coordinate[3], size_t &Index, double &Distance)
virtual bool Get_Nearest_Point (double Coordinate[3], size_t &Index)
virtual bool Get_Nearest_Value (double Coordinate[3], double &Value)
virtual CSG_ShapeGet_Nearest_Shape (double Coordinate[3])
virtual size_t Get_Duplicates (double Coordinate[3], CSG_Array_sLong &Indices, CSG_Vector &Distances)
virtual size_t Get_Duplicates (double Coordinate[3])
virtual size_t Get_Nearest_Points (double x, double y, double z, size_t Count, double Radius)
virtual size_t Get_Nearest_Points (double x, double y, double z, size_t Count, double Radius, CSG_Array_sLong &Indices, CSG_Vector &Distances)
virtual size_t Get_Nearest_Points (double x, double y, double z, size_t Count, size_t *Indices, double *Distances)
virtual bool Get_Nearest_Point (double x, double y, double z, size_t &Index, double &Distance)
virtual bool Get_Nearest_Point (double x, double y, double z, size_t &Index)
virtual bool Get_Nearest_Value (double x, double y, double z, double &Value)
virtual CSG_ShapeGet_Nearest_Shape (double x, double y, double z)
virtual size_t Get_Duplicates (double x, double y, double z, CSG_Array_sLong &Indices, CSG_Vector &Distances)
virtual size_t Get_Duplicates (double x, double y, double z)
Public Member Functions inherited from CSG_KDTree
 CSG_KDTree (void)
virtual ~CSG_KDTree (void)
bool is_Okay (void) const
size_t Get_Match_Count (void) const
size_t Get_Match_Index (size_t i) const
double Get_Match_Distance (size_t i) const
CSG_ShapeGet_Match_Shape (size_t i) const
int Get_Point_Count (void) const
double * Get_Point (int i) const
double * Get_Point (size_t i) const
double * operator[] (int i) const
double * operator[] (size_t i) const
virtual double Get_Point_Value (int i) const

Additional Inherited Members

Static Public Member Functions inherited from CSG_KDTree
static const char * Get_Version (void)
Protected Member Functions inherited from CSG_KDTree
void _On_Construction (void)
Protected Attributes inherited from CSG_KDTree
class CSG_KDTree_Adaptor * m_pAdaptor
void * m_pKDTree
CSG_Array_sLong m_Indices
CSG_Vector m_Distances
CSG_Matrix m_Points

Detailed Description

Definition at line 1310 of file shapes.h.

Constructor & Destructor Documentation

◆ CSG_KDTree_3D() [1/5]

CSG_KDTree_3D::CSG_KDTree_3D ( void )

Definition at line 699 of file kdtree.cpp.

References CSG_KDTree::_On_Construction().

◆ ~CSG_KDTree_3D()

CSG_KDTree_3D::~CSG_KDTree_3D ( void )
virtual

Definition at line 705 of file kdtree.cpp.

References Destroy().

◆ CSG_KDTree_3D() [2/5]

CSG_KDTree_3D::CSG_KDTree_3D ( CSG_Shapes * pPoints,
int Field = -1,
int zField = -1,
double zScale = 1. )

Creates a spatial index for the given points. If 'Field' refers to a valid field, an internal points array is created which omits points with no-data entries for the given field. If 'zField' refers to a valid field, its values are taken as coordinate of the 3rd dimension. Else it is expected that the points provide 3 dimensional coordinates (i.e. x-y-z or x-y-z-m).

Definition at line 720 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_3D() [3/5]

CSG_KDTree_3D::CSG_KDTree_3D ( CSG_PointCloud * pPoints)

Definition at line 785 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_3D() [4/5]

CSG_KDTree_3D::CSG_KDTree_3D ( const CSG_Matrix & Points)

Points matrix is expected to provide coordinates ordered in rows, with first, second and third column holding x, y and z coordinates.

Definition at line 815 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

◆ CSG_KDTree_3D() [5/5]

CSG_KDTree_3D::CSG_KDTree_3D ( const double ** Points,
size_t nPoints )

Points array is expected to provide coordinates ordered in rows, with first, second and third column holding x, y and z coordinates.

Definition at line 838 of file kdtree.cpp.

References CSG_KDTree::_On_Construction(), and Create().

Member Function Documentation

◆ Create() [1/4]

bool CSG_KDTree_3D::Create ( const CSG_Matrix & Points)

◆ Create() [2/4]

bool CSG_KDTree_3D::Create ( const double ** Points,
size_t nPoints )

Definition at line 845 of file kdtree.cpp.

References Destroy(), CSG_KDTree::m_pAdaptor, and CSG_KDTree::m_pKDTree.

◆ Create() [3/4]

bool CSG_KDTree_3D::Create ( CSG_PointCloud * pPoints)

◆ Create() [4/4]

◆ Destroy()

bool CSG_KDTree_3D::Destroy ( void )
virtual

Reimplemented from CSG_KDTree.

Definition at line 863 of file kdtree.cpp.

References CSG_KDTree::Destroy(), and CSG_KDTree::m_pKDTree.

Referenced by Create(), Create(), Create(), and ~CSG_KDTree_3D().

◆ Get_Duplicates() [1/4]

size_t CSG_KDTree_3D::Get_Duplicates ( double Coordinate[3])
virtual

Definition at line 1021 of file kdtree.cpp.

References Get_Duplicates(), CSG_KDTree::m_Distances, and CSG_KDTree::m_Indices.

◆ Get_Duplicates() [2/4]

size_t CSG_KDTree_3D::Get_Duplicates ( double Coordinate[3],
CSG_Array_sLong & Indices,
CSG_Vector & Distances )
virtual

◆ Get_Duplicates() [3/4]

size_t CSG_KDTree_3D::Get_Duplicates ( double x,
double y,
double z )
virtual

Definition at line 1067 of file kdtree.cpp.

References Get_Duplicates().

◆ Get_Duplicates() [4/4]

size_t CSG_KDTree_3D::Get_Duplicates ( double x,
double y,
double z,
CSG_Array_sLong & Indices,
CSG_Vector & Distances )
virtual

Definition at line 1062 of file kdtree.cpp.

References Get_Duplicates().

◆ Get_Nearest_Point() [1/4]

bool CSG_KDTree_3D::Get_Nearest_Point ( double Coordinate[3],
size_t & Index )
virtual

Definition at line 959 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Point() [2/4]

bool CSG_KDTree_3D::Get_Nearest_Point ( double Coordinate[3],
size_t & Index,
double & Distance )
virtual

Definition at line 953 of file kdtree.cpp.

References Get_Nearest_Points().

Referenced by Get_Nearest_Point(), Get_Nearest_Point(), and Get_Nearest_Shape().

◆ Get_Nearest_Point() [3/4]

bool CSG_KDTree_3D::Get_Nearest_Point ( double x,
double y,
double z,
size_t & Index )
virtual

Definition at line 1047 of file kdtree.cpp.

References Get_Nearest_Point().

◆ Get_Nearest_Point() [4/4]

bool CSG_KDTree_3D::Get_Nearest_Point ( double x,
double y,
double z,
size_t & Index,
double & Distance )
virtual

Definition at line 1042 of file kdtree.cpp.

References Get_Nearest_Point().

◆ Get_Nearest_Points() [1/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double Coordinate[3],
size_t Count,
double Radius )
virtual

◆ Get_Nearest_Points() [2/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double Coordinate[3],
size_t Count,
double Radius,
CSG_Array_sLong & Indices,
CSG_Vector & Distances )
virtual

◆ Get_Nearest_Points() [3/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double Coordinate[3],
size_t Count,
size_t * Indices,
double * Distances )
virtual

Definition at line 940 of file kdtree.cpp.

References CSG_KDTree::m_pKDTree.

◆ Get_Nearest_Points() [4/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double x,
double y,
double z,
size_t Count,
double Radius )
virtual

Definition at line 1027 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Points() [5/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double x,
double y,
double z,
size_t Count,
double Radius,
CSG_Array_sLong & Indices,
CSG_Vector & Distances )
virtual

Definition at line 1032 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Points() [6/6]

size_t CSG_KDTree_3D::Get_Nearest_Points ( double x,
double y,
double z,
size_t Count,
size_t * Indices,
double * Distances )
virtual

Definition at line 1037 of file kdtree.cpp.

References Get_Nearest_Points().

◆ Get_Nearest_Shape() [1/2]

CSG_Shape * CSG_KDTree_3D::Get_Nearest_Shape ( double Coordinate[3])
virtual

Definition at line 982 of file kdtree.cpp.

References Get_Nearest_Point(), CSG_Shapes::Get_Shape(), and CSG_KDTree::m_pAdaptor.

Referenced by Get_Nearest_Shape().

◆ Get_Nearest_Shape() [2/2]

CSG_Shape * CSG_KDTree_3D::Get_Nearest_Shape ( double x,
double y,
double z )
virtual

Definition at line 1057 of file kdtree.cpp.

References Get_Nearest_Shape().

◆ Get_Nearest_Value() [1/2]

bool CSG_KDTree_3D::Get_Nearest_Value ( double Coordinate[3],
double & Value )
virtual

Definition at line 967 of file kdtree.cpp.

References Get_Nearest_Points(), Get_Point_Value(), and CSG_KDTree::m_Points.

Referenced by Get_Nearest_Value().

◆ Get_Nearest_Value() [2/2]

bool CSG_KDTree_3D::Get_Nearest_Value ( double x,
double y,
double z,
double & Value )
virtual

Definition at line 1052 of file kdtree.cpp.

References Get_Nearest_Value().

◆ Get_Point_Value()

virtual double CSG_KDTree_3D::Get_Point_Value ( size_t i) const
inlinevirtual

Implements CSG_KDTree.

Definition at line 1330 of file shapes.h.

References CSG_KDTree::m_Points.

Referenced by Get_Nearest_Value().


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