LLOctreeNode< T > Class Template Reference

#include <lloctree.h>

Inheritance diagram for LLOctreeNode< T >:

Inheritance graph
[legend]
Collaboration diagram for LLOctreeNode< T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef LLOctreeTraveler< T > oct_traveler
typedef LLTreeTraveler< T > tree_traveler
typedef std::set< LLPointer< T > > element_list
typedef std::set< LLPointer< T >
>::iterator 
element_iter
typedef std::set< LLPointer< T >
>::const_iterator 
const_element_iter
typedef std::vector
< LLTreeListener< T >
* >::iterator 
tree_listener_iter
typedef std::vector
< LLOctreeNode< T > * > 
child_list
typedef LLTreeNode< T > BaseType
typedef LLOctreeNode< T > oct_node
typedef LLOctreeListener< T > oct_listener

Public Member Functions

 LLOctreeNode (LLVector3d center, LLVector3d size, BaseType *parent, U8 octant=255)
virtual ~LLOctreeNode ()
const BaseTypegetParent () const
void setParent (BaseType *parent)
const LLVector3dgetCenter () const
const LLVector3dgetSize () const
void setCenter (LLVector3d center)
void setSize (LLVector3d size)
oct_nodegetNodeAt (T *data)
U8 getOctant () const
void setOctant (U8 octant)
const oct_nodegetOctParent () const
oct_nodegetOctParent ()
U8 getOctant (const F64 pos[]) const
bool isInside (const LLVector3d &pos, const F64 &rad) const
bool isInside (T *data) const
bool isInside (const LLVector3d &pos) const
void updateMinMax ()
oct_listenergetOctListener (U32 index)
bool contains (T *xform)
bool contains (F64 radius)
void accept (oct_traveler *visitor)
virtual bool isLeaf () const
U32 getElementCount () const
element_listgetData ()
const element_listgetData () const
U32 getChildCount () const
oct_nodegetChild (U32 index)
const oct_nodegetChild (U32 index) const
child_listgetChildren ()
const child_listgetChildren () const
void accept (tree_traveler *visitor) const
void accept (oct_traveler *visitor) const
oct_nodegetNodeAt (const LLVector3d &pos, const F64 &rad)
virtual bool insert (T *data)
bool remove (T *data)
void removeByAddress (T *data)
void clearChildren ()
void validate ()
virtual bool balance ()
void destroy ()
void addChild (oct_node *child, BOOL silent=FALSE)
void removeChild (U8 index, BOOL destroy=FALSE)
void checkAlive ()
void deleteChild (oct_node *node)

Static Public Member Functions

static void pushCenter (LLVector3d &center, const LLVector3d &size, const T *data)

Static Public Attributes

static const U8 OCTANT_POSITIVE_X = 0x01
static const U8 OCTANT_POSITIVE_Y = 0x02
static const U8 OCTANT_POSITIVE_Z = 0x04

Protected Attributes

child_list mChild
element_list mData
oct_nodemParent
LLVector3d mCenter
LLVector3d mSize
LLVector3d mMax
LLVector3d mMin
U8 mOctant


Detailed Description

template<class T>
class LLOctreeNode< T >

Definition at line 76 of file lloctree.h.


Member Typedef Documentation

template<class T>
typedef LLOctreeTraveler<T> LLOctreeNode< T >::oct_traveler

Definition at line 79 of file lloctree.h.

template<class T>
typedef LLTreeTraveler<T> LLOctreeNode< T >::tree_traveler

Definition at line 80 of file lloctree.h.

template<class T>
typedef std::set<LLPointer<T> > LLOctreeNode< T >::element_list

Definition at line 81 of file lloctree.h.

template<class T>
typedef std::set<LLPointer<T> >::iterator LLOctreeNode< T >::element_iter

Definition at line 82 of file lloctree.h.

template<class T>
typedef std::set<LLPointer<T> >::const_iterator LLOctreeNode< T >::const_element_iter

Definition at line 83 of file lloctree.h.

template<class T>
typedef std::vector<LLTreeListener<T>*>::iterator LLOctreeNode< T >::tree_listener_iter

Definition at line 84 of file lloctree.h.

template<class T>
typedef std::vector<LLOctreeNode<T>* > LLOctreeNode< T >::child_list

Definition at line 85 of file lloctree.h.

template<class T>
typedef LLTreeNode<T> LLOctreeNode< T >::BaseType

Reimplemented in LLOctreeRoot< T >.

Definition at line 86 of file lloctree.h.

template<class T>
typedef LLOctreeNode<T> LLOctreeNode< T >::oct_node

Reimplemented in LLOctreeRoot< T >.

Definition at line 87 of file lloctree.h.

template<class T>
typedef LLOctreeListener<T> LLOctreeNode< T >::oct_listener

Definition at line 88 of file lloctree.h.


Constructor & Destructor Documentation

template<class T>
LLOctreeNode< T >::LLOctreeNode ( LLVector3d  center,
LLVector3d  size,
BaseType parent,
U8  octant = 255 
) [inline]

template<class T>
virtual LLOctreeNode< T >::~LLOctreeNode (  )  [inline, virtual]

Definition at line 112 of file lloctree.h.

References LLTreeNode< T >::destroyListeners(), LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), and i.

Here is the call graph for this function:


Member Function Documentation

template<class T>
const BaseType* LLOctreeNode< T >::getParent (  )  const [inline]

template<class T>
void LLOctreeNode< T >::setParent ( BaseType parent  )  [inline]

Definition at line 123 of file lloctree.h.

References LLOctreeNode< T >::mParent.

Referenced by LLOctreeNode< T >::addChild().

Here is the caller graph for this function:

template<class T>
const LLVector3d& LLOctreeNode< T >::getCenter (  )  const [inline]

template<class T>
const LLVector3d& LLOctreeNode< T >::getSize (  )  const [inline]

template<class T>
void LLOctreeNode< T >::setCenter ( LLVector3d  center  )  [inline]

Definition at line 126 of file lloctree.h.

References LLOctreeNode< T >::mCenter.

Referenced by LLOctreeRoot< T >::balance(), LLOctreeRoot< T >::insert(), and LLSpatialGroup::shift().

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::setSize ( LLVector3d  size  )  [inline]

Definition at line 127 of file lloctree.h.

References LLOctreeNode< T >::mSize.

Referenced by LLOctreeRoot< T >::balance(), and LLOctreeRoot< T >::insert().

Here is the caller graph for this function:

template<class T>
oct_node* LLOctreeNode< T >::getNodeAt ( T *  data  )  [inline]

Definition at line 128 of file lloctree.h.

Referenced by LLPipeline::findReflectionMap(), LLOctreeNode< T >::getNodeAt(), LLOctreeRoot< T >::insert(), and LLOctreeNode< T >::remove().

Here is the caller graph for this function:

template<class T>
U8 LLOctreeNode< T >::getOctant (  )  const [inline]

Definition at line 129 of file lloctree.h.

References LLOctreeNode< T >::mOctant.

Referenced by LLOctreeNode< T >::getNodeAt().

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::setOctant ( U8  octant  )  [inline]

Definition at line 130 of file lloctree.h.

References LLOctreeNode< T >::mOctant.

template<class T>
const oct_node* LLOctreeNode< T >::getOctParent (  )  const [inline]

Definition at line 131 of file lloctree.h.

References LLOctreeNode< T >::getParent().

Referenced by LLOctreeNode< T >::checkAlive(), LLSpatialGroup::getParent(), LLOctreeNode< T >::insert(), LLOctreeNode< T >::remove(), and LLSpatialGroup::updateInGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
oct_node* LLOctreeNode< T >::getOctParent (  )  [inline]

Definition at line 132 of file lloctree.h.

References LLOctreeNode< T >::getParent().

Here is the call graph for this function:

template<class T>
U8 LLOctreeNode< T >::getOctant ( const F64  pos[]  )  const [inline]

template<class T>
bool LLOctreeNode< T >::isInside ( const LLVector3d pos,
const F64 rad 
) const [inline]

template<class T>
bool LLOctreeNode< T >::isInside ( T *  data  )  const [inline]

Definition at line 159 of file lloctree.h.

References LLOctreeNode< T >::isInside().

Here is the call graph for this function:

template<class T>
bool LLOctreeNode< T >::isInside ( const LLVector3d pos  )  const [inline]

Definition at line 164 of file lloctree.h.

References LLVector3d::mdV, LLOctreeNode< T >::mMax, and LLOctreeNode< T >::mMin.

template<class T>
void LLOctreeNode< T >::updateMinMax (  )  [inline]

template<class T>
oct_listener* LLOctreeNode< T >::getOctListener ( U32  index  )  [inline]

Definition at line 190 of file lloctree.h.

References LLTreeNode< T >::getListener().

Referenced by LLOctreeNode< T >::addChild(), and LLOctreeNode< T >::removeChild().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
bool LLOctreeNode< T >::contains ( T *  xform  )  [inline]

Definition at line 195 of file lloctree.h.

Referenced by LLOctreeNode< T >::getNodeAt(), LLOctreeNode< T >::insert(), and LLSpatialGroup::updateInGroup().

Here is the caller graph for this function:

template<class T>
bool LLOctreeNode< T >::contains ( F64  radius  )  [inline]

template<class T>
static void LLOctreeNode< T >::pushCenter ( LLVector3d center,
const LLVector3d size,
const T *  data 
) [inline, static]

Definition at line 214 of file lloctree.h.

References i, and LLVector3d::mdV.

Referenced by LLOctreeRoot< T >::insert(), and LLOctreeNode< T >::insert().

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::accept ( oct_traveler visitor  )  [inline]

Definition at line 230 of file lloctree.h.

References LLOctreeTraveler< T >::visit().

Referenced by LLOctreePick::check(), LLOctreeRenderNonOccluded::traverse(), LLOctreeStateCheck::traverse(), and LLOctreeTraveler< T >::traverse().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
virtual bool LLOctreeNode< T >::isLeaf (  )  const [inline, virtual]

Definition at line 231 of file lloctree.h.

References LLOctreeNode< T >::mChild.

Referenced by LLOctreeRoot< T >::balance(), and LLSpatialGroup::rebound().

Here is the caller graph for this function:

template<class T>
U32 LLOctreeNode< T >::getElementCount (  )  const [inline]

template<class T>
element_list& LLOctreeNode< T >::getData (  )  [inline]

template<class T>
const element_list& LLOctreeNode< T >::getData (  )  const [inline]

Definition at line 235 of file lloctree.h.

References LLOctreeNode< T >::mData.

template<class T>
U32 LLOctreeNode< T >::getChildCount (  )  const [inline]

template<class T>
oct_node* LLOctreeNode< T >::getChild ( U32  index  )  [inline]

template<class T>
const oct_node* LLOctreeNode< T >::getChild ( U32  index  )  const [inline]

Definition at line 239 of file lloctree.h.

References LLOctreeNode< T >::mChild.

template<class T>
child_list& LLOctreeNode< T >::getChildren (  )  [inline]

Definition at line 240 of file lloctree.h.

References LLOctreeNode< T >::mChild.

template<class T>
const child_list& LLOctreeNode< T >::getChildren (  )  const [inline]

Definition at line 241 of file lloctree.h.

References LLOctreeNode< T >::mChild.

template<class T>
void LLOctreeNode< T >::accept ( tree_traveler visitor  )  const [inline]

Definition at line 243 of file lloctree.h.

References LLTreeTraveler< T >::visit().

Here is the call graph for this function:

template<class T>
void LLOctreeNode< T >::accept ( oct_traveler visitor  )  const [inline]

Definition at line 244 of file lloctree.h.

References LLOctreeTraveler< T >::visit().

Here is the call graph for this function:

template<class T>
oct_node* LLOctreeNode< T >::getNodeAt ( const LLVector3d pos,
const F64 rad 
) [inline]

template<class T>
virtual bool LLOctreeNode< T >::insert ( T *  data  )  [inline, virtual]

template<class T>
bool LLOctreeNode< T >::remove ( T *  data  )  [inline, virtual]

template<class T>
void LLOctreeNode< T >::removeByAddress ( T *  data  )  [inline]

template<class T>
void LLOctreeNode< T >::clearChildren (  )  [inline]

Definition at line 433 of file lloctree.h.

References LLOctreeNode< T >::mChild.

Referenced by LLOctreeRoot< T >::balance(), LLOctreeRoot< T >::insert(), and LLOctreeNode< T >::LLOctreeNode().

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::validate (  )  [inline]

Definition at line 438 of file lloctree.h.

References LLOctreeNode< T >::getChildCount(), LLOctreeNode< T >::getParent(), i, llendl, llerrs, and LLOctreeNode< T >::mChild.

Here is the call graph for this function:

template<class T>
virtual bool LLOctreeNode< T >::balance (  )  [inline, virtual]

Reimplemented in LLOctreeRoot< T >.

Definition at line 452 of file lloctree.h.

Referenced by LLSpatialBridge::LLSpatialBridge(), LLPipeline::updateMove(), and LLSpatialBridge::updateMove().

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::destroy (  )  [inline]

Definition at line 457 of file lloctree.h.

References LLOctreeNode< T >::getChildCount(), i, and LLOctreeNode< T >::mChild.

Referenced by LLOctreeNode< T >::removeChild().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::addChild ( oct_node child,
BOOL  silent = FALSE 
) [inline]

template<class T>
void LLOctreeNode< T >::removeChild ( U8  index,
BOOL  destroy = FALSE 
) [inline]

template<class T>
void LLOctreeNode< T >::checkAlive (  )  [inline]

Definition at line 518 of file lloctree.h.

References LLOctreeNode< T >::deleteChild(), LLOctreeNode< T >::getChildCount(), LLOctreeNode< T >::getElementCount(), and LLOctreeNode< T >::getOctParent().

Referenced by LLOctreeNode< T >::remove(), LLOctreeNode< T >::removeByAddress(), and LLOctreeNode< T >::removeChild().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
void LLOctreeNode< T >::deleteChild ( oct_node node  )  [inline]

Definition at line 530 of file lloctree.h.

References LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), i, LLOctreeNode< T >::removeChild(), and TRUE.

Referenced by LLOctreeNode< T >::checkAlive().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<class T>
const U8 LLOctreeNode< T >::OCTANT_POSITIVE_X = 0x01 [static]

Definition at line 90 of file lloctree.h.

Referenced by LLOctreeNode< T >::getOctant().

template<class T>
const U8 LLOctreeNode< T >::OCTANT_POSITIVE_Y = 0x02 [static]

Definition at line 91 of file lloctree.h.

Referenced by LLOctreeNode< T >::getOctant().

template<class T>
const U8 LLOctreeNode< T >::OCTANT_POSITIVE_Z = 0x04 [static]

Definition at line 92 of file lloctree.h.

Referenced by LLOctreeNode< T >::getOctant().

template<class T>
child_list LLOctreeNode< T >::mChild [protected]

template<class T>
element_list LLOctreeNode< T >::mData [protected]

template<class T>
oct_node* LLOctreeNode< T >::mParent [protected]

template<class T>
LLVector3d LLOctreeNode< T >::mCenter [protected]

template<class T>
LLVector3d LLOctreeNode< T >::mSize [protected]

template<class T>
LLVector3d LLOctreeNode< T >::mMax [protected]

Definition at line 550 of file lloctree.h.

Referenced by LLOctreeNode< T >::isInside(), and LLOctreeNode< T >::updateMinMax().

template<class T>
LLVector3d LLOctreeNode< T >::mMin [protected]

Definition at line 551 of file lloctree.h.

Referenced by LLOctreeNode< T >::isInside(), and LLOctreeNode< T >::updateMinMax().

template<class T>
U8 LLOctreeNode< T >::mOctant [protected]


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

Generated on Fri May 16 08:54:57 2008 for SecondLife by  doxygen 1.5.5