HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_PointTree Class Reference

#include <UT_PointTree.h>

Public Member Functions

 UT_PointTree ()
 
virtual ~UT_PointTree ()
 
int build (const UT_Array< void * > &data, const UT_Vector3Array &points, int maxsize=5)
 
voidfindNearest (const UT_Vector3 &pt, float maxdist, UT_PointTreeValidNearestFunc=NULL, void *user_data=NULL)
 
void findNearestGroup (const UT_Vector3 &pt, float maxdist, int groupsize, UT_Array< void * > &group, UT_FloatArray &groupdist2, UT_PointTreeValidNearestFunc=NULL, void *user_data=NULL)
 
int findAllClose (const UT_Vector3 &pt, float maxdist, UT_Array< void * > &data)
 
int findAllInTube (const UT_Vector3 &orig, const UT_Vector3 &dir, fpreal rad, UT_Array< void * > &data)
 
void getBBox (UT_BoundingBox &box) const
 
int verifyTree () const
 
void destroyTree ()
 

Protected Member Functions

void destroyNode (utPointNode *node)
 
int verifyNode (UT_BoundingBox &box, utPointNode *node) const
 
void testAxis (const UT_BoundingBox &box, int axis, const UT_Vector3Array &points, int &splitleft, int &splitright)
 
void splitOnAxis (const UT_BoundingBox &box, int axis, const UT_Array< void * > &data, const UT_Vector3Array &points, UT_Array< void * > &dataleft, UT_Vector3Array &pointsleft, UT_Array< void * > &dataright, UT_Vector3Array &pointsright)
 
utPointNode * buildChildNode (const UT_BoundingBox &box, const UT_Array< void * > &data, const UT_Vector3Array &points, int inbboxnode=0)
 
voidfindNearestNode (UT_BoundingBox &box, utPointNode *node, const UT_Vector3 &pt, float &maxdist, UT_PointTreeValidNearestFunc=NULL, void *user_data=NULL)
 
void findNearestNodeGroup (UT_BoundingBox &box, utPointNode *node, const UT_Vector3 &pt, ut_PointTreeQueue &q, UT_PointTreeValidNearestFunc=NULL, void *user_data=NULL)
 
int findCloseNodes (UT_BoundingBox &box, utPointNode *node, const UT_Vector3 &pt, float &maxdist, UT_Array< void * > &data)
 
int findInTube (UT_BoundingBox &box, utPointNode *node, const UT_Vector3 &orig, const UT_Vector3 &dir, fpreal radius, fpreal radius2, UT_Array< void * > &data)
 

Protected Attributes

utPointNode * myRoot
 
UT_BoundingBox myBBox
 
int myMaxSize
 

Detailed Description

Definition at line 34 of file UT_PointTree.h.

Constructor & Destructor Documentation

UT_PointTree::UT_PointTree ( )
virtual UT_PointTree::~UT_PointTree ( )
virtual

Member Function Documentation

int UT_PointTree::build ( const UT_Array< void * > &  data,
const UT_Vector3Array points,
int  maxsize = 5 
)
utPointNode* UT_PointTree::buildChildNode ( const UT_BoundingBox box,
const UT_Array< void * > &  data,
const UT_Vector3Array points,
int  inbboxnode = 0 
)
protected
void UT_PointTree::destroyNode ( utPointNode *  node)
protected
void UT_PointTree::destroyTree ( )
int UT_PointTree::findAllClose ( const UT_Vector3 pt,
float  maxdist,
UT_Array< void * > &  data 
)
int UT_PointTree::findAllInTube ( const UT_Vector3 orig,
const UT_Vector3 dir,
fpreal  rad,
UT_Array< void * > &  data 
)
int UT_PointTree::findCloseNodes ( UT_BoundingBox box,
utPointNode *  node,
const UT_Vector3 pt,
float maxdist,
UT_Array< void * > &  data 
)
protected
int UT_PointTree::findInTube ( UT_BoundingBox box,
utPointNode *  node,
const UT_Vector3 orig,
const UT_Vector3 dir,
fpreal  radius,
fpreal  radius2,
UT_Array< void * > &  data 
)
protected
void* UT_PointTree::findNearest ( const UT_Vector3 pt,
float  maxdist,
UT_PointTreeValidNearestFunc  = NULL,
void user_data = NULL 
)
void UT_PointTree::findNearestGroup ( const UT_Vector3 pt,
float  maxdist,
int  groupsize,
UT_Array< void * > &  group,
UT_FloatArray groupdist2,
UT_PointTreeValidNearestFunc  = NULL,
void user_data = NULL 
)
void* UT_PointTree::findNearestNode ( UT_BoundingBox box,
utPointNode *  node,
const UT_Vector3 pt,
float maxdist,
UT_PointTreeValidNearestFunc  = NULL,
void user_data = NULL 
)
protected
void UT_PointTree::findNearestNodeGroup ( UT_BoundingBox box,
utPointNode *  node,
const UT_Vector3 pt,
ut_PointTreeQueue &  q,
UT_PointTreeValidNearestFunc  = NULL,
void user_data = NULL 
)
protected
void UT_PointTree::getBBox ( UT_BoundingBox box) const
inline

Definition at line 74 of file UT_PointTree.h.

void UT_PointTree::splitOnAxis ( const UT_BoundingBox box,
int  axis,
const UT_Array< void * > &  data,
const UT_Vector3Array points,
UT_Array< void * > &  dataleft,
UT_Vector3Array pointsleft,
UT_Array< void * > &  dataright,
UT_Vector3Array pointsright 
)
protected
void UT_PointTree::testAxis ( const UT_BoundingBox box,
int  axis,
const UT_Vector3Array points,
int splitleft,
int splitright 
)
protected
int UT_PointTree::verifyNode ( UT_BoundingBox box,
utPointNode *  node 
) const
protected
int UT_PointTree::verifyTree ( ) const

Member Data Documentation

UT_BoundingBox UT_PointTree::myBBox
protected

Definition at line 133 of file UT_PointTree.h.

int UT_PointTree::myMaxSize
protected

Definition at line 134 of file UT_PointTree.h.

utPointNode* UT_PointTree::myRoot
protected

Definition at line 132 of file UT_PointTree.h.


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