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 LLTreeNode< T > BaseType
typedef LLTreeState< T > tree_state
typedef LLOctreeState< T > oct_state
typedef LLOctreeNode< T > oct_node
typedef LLOctreeListener< T > oct_listener

Public Member Functions

 LLOctreeNode (LLVector3d center, LLVector3d size, tree_state *state, BaseType *parent, U8 octant=255)
 ~LLOctreeNode ()
const BaseTypegetParent () const
void setParent (BaseType *parent)
const LLVector3dgetCenter () const
const LLVector3dgetSize () const
void setCenter (LLVector3d center)
void setSize (LLVector3d size)
bool balance ()
void validate ()
U32 getChildCount () const
oct_nodegetChild (U32 index)
const oct_nodegetChild (U32 index) const
U32 getElementCount () const
void removeByAddress (T *data)
bool hasLeafState () const
void destroy ()
oct_nodegetNodeAt (T *data)
oct_nodegetNodeAt (const LLVector3d &pos, const F64 &rad)
U8 getOctant () const
void setOctant (U8 octant)
const oct_stategetOctState () const
oct_stategetOctState ()
const oct_nodegetOctParent () const
oct_nodegetOctParent ()
void deleteChild (oct_node *child)
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)

Static Public Member Functions

static void pushCenter (LLVector3d &center, LLVector3d &size, 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

oct_nodemParent
LLVector3d mCenter
LLVector3d mSize
LLVector3d mMax
LLVector3d mMin
U8 mOctant

Detailed Description

template<class T>
class LLOctreeNode< T >

Definition at line 69 of file lloctree.h.


Member Typedef Documentation

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

Definition at line 73 of file lloctree.h.

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

Definition at line 77 of file lloctree.h.

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

Definition at line 76 of file lloctree.h.

template<class T>
typedef LLOctreeState<T> LLOctreeNode< T >::oct_state

Definition at line 75 of file lloctree.h.

template<class T>
typedef LLTreeState<T> LLOctreeNode< T >::tree_state

Definition at line 74 of file lloctree.h.


Constructor & Destructor Documentation

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

Definition at line 83 of file lloctree.h.

References LLOctreeNode< T >::mCenter, LLVector3d::mdV, LLOctreeNode< T >::mOctant, LLOctreeNode< T >::mParent, and LLOctreeNode< T >::updateMinMax().

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

Definition at line 101 of file lloctree.h.

References LLTreeNode< T >::destroyListeners(), and LLTreeNode< T >::mState.


Member Function Documentation

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

Definition at line 109 of file lloctree.h.

References LLOctreeState< T >::balance(), and LLOctreeNode< T >::getOctState().

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

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

Definition at line 194 of file lloctree.h.

References LLVector3d::mdV, LLOctreeNode< T >::mParent, LLOctreeNode< T >::mSize, NULL, and size.

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

Definition at line 189 of file lloctree.h.

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

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

Definition at line 126 of file lloctree.h.

References LLOctreeState< T >::deleteChild(), and LLOctreeNode< T >::getOctState().

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

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

Definition at line 117 of file lloctree.h.

References LLOctreeState< T >::destroy(), and LLOctreeNode< T >::getOctState().

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

Definition at line 105 of file lloctree.h.

References LLOctreeNode< T >::mCenter.

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

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

Definition at line 113 of file lloctree.h.

References LLOctreeState< T >::getChild(), and LLOctreeNode< T >::getOctState().

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

Definition at line 112 of file lloctree.h.

References LLOctreeState< T >::getChild(), and LLOctreeNode< T >::getOctState().

Referenced by LLOctreePick::check(), LLOctreeState< T >::getNodeAt(), LLSpatialPartition::processOcclusion(), LLSpatialGroup::rebound(), LLRelightPainter::traverse(), and LLSpatialGroup::validate().

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

Definition at line 111 of file lloctree.h.

References LLOctreeState< T >::getChildCount(), and LLOctreeNode< T >::getOctState().

Referenced by LLOctreePick::check(), LLOctreeState< T >::getNodeAt(), LLSpatialPartition::processOcclusion(), LLSpatialGroup::rebound(), LLRelightPainter::traverse(), and LLSpatialGroup::validate().

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

Definition at line 114 of file lloctree.h.

References LLOctreeState< T >::getElementCount(), and LLOctreeNode< T >::getOctState().

Referenced by LLOctreeState< T >::insert(), LLSpatialGroup::rebound(), and LLSpatialGroup::updateInGroup().

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

Definition at line 119 of file lloctree.h.

References LLOctreeState< T >::getNodeAt(), and LLOctreeNode< T >::getOctState().

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

Definition at line 118 of file lloctree.h.

Referenced by LLSpatialPartition::put(), and LLDrawPoolBump::renderActive().

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

Definition at line 128 of file lloctree.h.

References LLOctreeNode< T >::mCenter, LLVector3d::mdV, LLOctreeNode< T >::OCTANT_POSITIVE_X, LLOctreeNode< T >::OCTANT_POSITIVE_Y, and LLOctreeNode< T >::OCTANT_POSITIVE_Z.

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

Definition at line 120 of file lloctree.h.

References LLOctreeNode< T >::mOctant.

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

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

Definition at line 184 of file lloctree.h.

References LLTreeNode< T >::getListener().

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

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

Definition at line 125 of file lloctree.h.

References LLOctreeNode< T >::getParent().

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

Definition at line 124 of file lloctree.h.

References LLOctreeNode< T >::getParent().

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

template<class T>
oct_state* LLOctreeNode< T >::getOctState (  )  [inline]

Definition at line 123 of file lloctree.h.

References LLTreeNode< T >::mState.

template<class T>
const oct_state* LLOctreeNode< T >::getOctState (  )  const [inline]

Definition at line 122 of file lloctree.h.

References LLTreeNode< T >::mState.

Referenced by LLOctreeNode< T >::balance(), LLSpatialGroup::boundObjects(), LLOctreePick::check(), LLOctreeNode< T >::deleteChild(), LLOctreeNode< T >::destroy(), LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), LLSpatialGroup::getData(), LLOctreeNode< T >::getElementCount(), LLOctreeNode< T >::getNodeAt(), LLOctreeNode< T >::hasLeafState(), LLOctreeNode< T >::removeByAddress(), LLOctreeRenderNonOccluded::traverse(), and LLOctreeNode< T >::validate().

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

Definition at line 103 of file lloctree.h.

References LLOctreeNode< T >::mParent.

Referenced by LLSpatialGroup::boundObjects(), LLOctreeState< T >::getNodeAt(), LLOctreeNode< T >::getOctParent(), and LLSpatialGroup::unbound().

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

Definition at line 106 of file lloctree.h.

References LLOctreeNode< T >::mSize.

Referenced by LLOctreeState< T >::addChild(), LLOctreeState< T >::getNodeAt(), LLOctreeRoot< T >::insert(), LLOctreeState< T >::insert(), LLSpatialGroup::LLSpatialGroup(), LLSpatialBridge::updateBinRadius(), LLSpatialGroup::updateDistance(), and LLSpatialGroup::updateInGroup().

template<class T>
bool LLOctreeNode< T >::hasLeafState (  )  const [inline]

Definition at line 116 of file lloctree.h.

References LLOctreeNode< T >::getOctState(), and LLOctreeState< T >::isLeaf().

Referenced by LLSpatialGroup::rebound().

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

Definition at line 158 of file lloctree.h.

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

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

Definition at line 153 of file lloctree.h.

References LLOctreeNode< T >::isInside().

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

Definition at line 148 of file lloctree.h.

References LLVector3d::mdV, and LLOctreeNode< T >::mSize.

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

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

Definition at line 208 of file lloctree.h.

References i, LLVector3d::mdV, and size.

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

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

Definition at line 115 of file lloctree.h.

References LLOctreeNode< T >::getOctState(), and LLOctreeState< T >::removeByAddress().

Referenced by LLOctreeState< T >::remove().

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

Definition at line 107 of file lloctree.h.

References LLOctreeNode< T >::mCenter.

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

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

Definition at line 121 of file lloctree.h.

References LLOctreeNode< T >::mOctant.

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

Definition at line 104 of file lloctree.h.

References LLOctreeNode< T >::mParent.

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

Definition at line 108 of file lloctree.h.

References LLOctreeNode< T >::mSize, and size.

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

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

Definition at line 174 of file lloctree.h.

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

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

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

Definition at line 110 of file lloctree.h.

References LLOctreeNode< T >::getOctState(), and LLOctreeState< T >::validate().


Member Data Documentation

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

Definition at line 226 of file lloctree.h.

Referenced by LLOctreeNode< T >::getCenter(), LLOctreeNode< T >::getOctant(), LLOctreeNode< T >::LLOctreeNode(), LLOctreeNode< T >::setCenter(), and LLOctreeNode< T >::updateMinMax().

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

Definition at line 228 of file lloctree.h.

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

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

Definition at line 229 of file lloctree.h.

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

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

Definition at line 230 of file lloctree.h.

Referenced by LLOctreeNode< T >::getOctant(), LLOctreeNode< T >::LLOctreeNode(), and LLOctreeNode< T >::setOctant().

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

Definition at line 225 of file lloctree.h.

Referenced by LLOctreeNode< T >::contains(), LLOctreeNode< T >::getParent(), LLOctreeNode< T >::LLOctreeNode(), and LLOctreeNode< T >::setParent().

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

Definition at line 227 of file lloctree.h.

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

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

Definition at line 79 of file lloctree.h.

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

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

Definition at line 80 of file lloctree.h.

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

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

Definition at line 81 of file lloctree.h.

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


The documentation for this class was generated from the following file:
Generated on Thu Jul 1 06:11:33 2010 for Second Life Viewer by  doxygen 1.4.7