KdCell Class Reference
#include <KdCell.h>
List of all members.
Public Member Functions |
| KdCell () |
| KdCell (int inSplitType, double inSplitValue) |
bool | equals (KdCell &other) |
virtual KdCell * | createNewBlankCell (int splitType, double splitValue) |
bool | notifyContentsRebuilt (bool inChange) |
bool | contains (NodeWrapper &point) |
void | getAll (vector< NodeWrapper * > &allLeaves) |
bool | remove (NodeWrapper &nw) |
bool | removeInternal (NodeWrapper &nw, KdCell *parent, KdCell *grandParent) |
bool | add (NodeWrapper &nw) |
Static Public Member Functions |
static void | cleanupTree (KdCell *root) |
static KdCell * | subDivide (vector< NodeWrapper * > &list, int offset, const int size, vector< double > *arr, KdCell &factory) |
static double | computeSplitValue (vector< NodeWrapper * > &list, int offset, int size, int pSplitType, vector< double > *arr) |
static double | findSplitComponent (NodeWrapper &n, int pSplitType) |
static double | findMedianGapSplit (vector< double > *arr, int size) |
static int | splitList (vector< NodeWrapper * > &list, int startIndex, int size, double pSplitValue, const int pSplitType) |
static bool | add (KdCell *parent, KdCell *current, NodeWrapper &nw) |
Public Attributes |
bool | removeFromTree |
Static Public Attributes |
static const int | LEAF = 3 |
static const int | SPLIT_X = 0 |
static const int | SPLIT_Y = 1 |
static const int | SPLIT_Z = 2 |
static const int | MAX_POINTS_IN_CELL = 4 |
Protected Attributes |
Point3 | min |
Point3 | max |
const int | splitType |
const double | splitValue |
KdCell * | leftChild |
KdCell * | rightChild |
vector< NodeWrapper * > | pointList |
Private Member Functions |
bool | notifyPointAdded (NodeWrapper &nw, bool inChange) |
bool | addToBoundingBoxIfChanged (NodeWrapper &nw) |
void | computeBoundingBoxFromPoints (vector< NodeWrapper * > &list, int size) |
bool | recomputeLeafBoundingBoxIfChanges () |
bool | recomputeParentBoundingBoxIfChanges () |
bool | updateBoundingBox (Point3 &newMin, Point3 &newMax) |
Friends |
ostream & | operator<< (ostream &s, KdCell &cell) |
Constructor & Destructor Documentation
KdCell::KdCell |
( |
|
) |
[inline] |
KdCell::KdCell |
( |
int |
inSplitType, |
|
|
double |
inSplitValue | |
|
) |
| | [inline] |
Member Function Documentation
bool KdCell::addToBoundingBoxIfChanged |
( |
NodeWrapper & |
nw |
) |
[inline, private] |
static void KdCell::cleanupTree |
( |
KdCell * |
root |
) |
[inline, static] |
void KdCell::computeBoundingBoxFromPoints |
( |
vector< NodeWrapper * > & |
list, |
|
|
int |
size | |
|
) |
| | [inline, private] |
static double KdCell::computeSplitValue |
( |
vector< NodeWrapper * > & |
list, |
|
|
int |
offset, |
|
|
int |
size, |
|
|
int |
pSplitType, |
|
|
vector< double > * |
arr | |
|
) |
| | [inline, static] |
virtual KdCell* KdCell::createNewBlankCell |
( |
int |
splitType, |
|
|
double |
splitValue | |
|
) |
| | [inline, virtual] |
bool KdCell::equals |
( |
KdCell & |
other |
) |
[inline] |
static double KdCell::findMedianGapSplit |
( |
vector< double > * |
arr, |
|
|
int |
size | |
|
) |
| | [inline, static] |
static double KdCell::findSplitComponent |
( |
NodeWrapper & |
n, |
|
|
int |
pSplitType | |
|
) |
| | [inline, static] |
void KdCell::getAll |
( |
vector< NodeWrapper * > & |
allLeaves |
) |
[inline] |
bool KdCell::notifyContentsRebuilt |
( |
bool |
inChange |
) |
[inline] |
bool KdCell::notifyPointAdded |
( |
NodeWrapper & |
nw, |
|
|
bool |
inChange | |
|
) |
| | [inline, private] |
bool KdCell::recomputeLeafBoundingBoxIfChanges |
( |
|
) |
[inline, private] |
bool KdCell::recomputeParentBoundingBoxIfChanges |
( |
|
) |
[inline, private] |
static int KdCell::splitList |
( |
vector< NodeWrapper * > & |
list, |
|
|
int |
startIndex, |
|
|
int |
size, |
|
|
double |
pSplitValue, |
|
|
const int |
pSplitType | |
|
) |
| | [inline, static] |
static KdCell* KdCell::subDivide |
( |
vector< NodeWrapper * > & |
list, |
|
|
int |
offset, |
|
|
const int |
size, |
|
|
vector< double > * |
arr, |
|
|
KdCell & |
factory | |
|
) |
| | [inline, static] |
bool KdCell::updateBoundingBox |
( |
Point3 & |
newMin, |
|
|
Point3 & |
newMax | |
|
) |
| | [inline, private] |
Friends And Related Function Documentation
ostream& operator<< |
( |
ostream & |
s, |
|
|
KdCell & |
cell | |
|
) |
| | [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: