KdCell Class Reference

#include <KdCell.h>

Inheritance diagram for KdCell:
KdTree

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

static bool KdCell::add ( KdCell *  parent,
KdCell *  current,
NodeWrapper &  nw 
) [inline, static]
bool KdCell::add ( NodeWrapper &  nw  )  [inline]
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]
bool KdCell::contains ( NodeWrapper &  point  )  [inline]
virtual KdCell* KdCell::createNewBlankCell ( int  splitType,
double  splitValue 
) [inline, virtual]

Reimplemented in KdTree.

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]

Reimplemented in KdTree.

bool KdCell::recomputeLeafBoundingBoxIfChanges (  )  [inline, private]
bool KdCell::recomputeParentBoundingBoxIfChanges (  )  [inline, private]
bool KdCell::remove ( NodeWrapper &  nw  )  [inline]
bool KdCell::removeInternal ( NodeWrapper &  nw,
KdCell *  parent,
KdCell *  grandParent 
) [inline]
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

const int KdCell::LEAF = 3 [static]
KdCell* KdCell::leftChild [protected]
Point3 KdCell::max [protected]
const int KdCell::MAX_POINTS_IN_CELL = 4 [static]
Point3 KdCell::min [protected]
vector<NodeWrapper*> KdCell::pointList [protected]
KdCell* KdCell::rightChild [protected]
const int KdCell::SPLIT_X = 0 [static]
const int KdCell::SPLIT_Y = 1 [static]
const int KdCell::SPLIT_Z = 2 [static]
const int KdCell::splitType [protected]
const double KdCell::splitValue [protected]

The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:27 2011 for Galois by  doxygen 1.6.3