LLOctreeState< T > Class Template Reference

#include <lloctree.h>

Inheritance diagram for LLOctreeState< T >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef LLTreeState< T > BaseType
typedef LLOctreeTraveler< T > oct_traveler
typedef LLOctreeNode< T > oct_node
typedef LLOctreeListener< T > oct_listener
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

Public Member Functions

 LLOctreeState (oct_node *node=NULL)
virtual ~LLOctreeState ()
virtual void accept (oct_traveler *visitor)
virtual bool isLeaf () const
virtual U32 getElementCount () const
virtual element_listgetData ()
virtual const element_listgetData () const
virtual U32 getChildCount () const
virtual oct_nodegetChild (U32 index)
virtual const oct_nodegetChild (U32 index) const
virtual child_listgetChildren ()
virtual const child_listgetChildren () const
virtual void accept (tree_traveler *visitor) const
virtual void accept (oct_traveler *visitor) const
const oct_nodegetOctNode () const
oct_nodegetOctNode ()
virtual oct_nodegetNodeAt (T *data)
virtual oct_nodegetNodeAt (const LLVector3d &pos, const F64 &rad)
virtual bool insert (T *data)
virtual bool remove (T *data)
virtual void removeByAddress (T *data)
virtual void clearChildren ()
virtual void validate ()
virtual bool balance ()
virtual void destroy ()
virtual void addChild (oct_node *child, BOOL silent=FALSE)
virtual void removeChild (U8 index, BOOL destroy=FALSE)
virtual void checkAlive ()
virtual void deleteChild (oct_node *node)

Protected Attributes

child_list mChild
element_list mData

Detailed Description

template<class T>
class LLOctreeState< T >

Definition at line 244 of file lloctree.h.


Member Typedef Documentation

template<class T>
typedef LLTreeState<T> LLOctreeState< T >::BaseType

Reimplemented in LLOctreeRoot< T >.

Definition at line 247 of file lloctree.h.

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

Definition at line 256 of file lloctree.h.

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

Definition at line 254 of file lloctree.h.

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

Definition at line 253 of file lloctree.h.

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

Definition at line 252 of file lloctree.h.

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

Definition at line 250 of file lloctree.h.

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

Reimplemented in LLOctreeRoot< T >.

Definition at line 249 of file lloctree.h.

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

Definition at line 248 of file lloctree.h.

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

Definition at line 255 of file lloctree.h.

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

Definition at line 251 of file lloctree.h.


Constructor & Destructor Documentation

template<class T>
LLOctreeState< T >::LLOctreeState ( oct_node node = NULL  )  [inline]

Definition at line 258 of file lloctree.h.

References LLOctreeState< T >::clearChildren().

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

Definition at line 259 of file lloctree.h.

References LLOctreeState< T >::getChild(), LLOctreeState< T >::getChildCount(), and i.


Member Function Documentation

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

Definition at line 282 of file lloctree.h.

References LLOctreeTraveler< T >::visit().

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

Implements LLTreeState< T >.

Definition at line 281 of file lloctree.h.

References LLTreeTraveler< T >::visit().

template<class T>
virtual void LLOctreeState< T >::accept ( oct_traveler visitor  )  [inline, virtual]

Definition at line 268 of file lloctree.h.

References LLOctreeTraveler< T >::visit().

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

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

Definition at line 520 of file lloctree.h.

References LLOctreeNode< T >::getCenter(), LLOctreeState< T >::getChildCount(), LLTreeNode< T >::getListenerCount(), LLOctreeNode< T >::getOctListener(), LLOctreeState< T >::getOctNode(), LLOctreeNode< T >::getSize(), LLOctreeListener< T >::handleChildAddition(), i, llendl, LLOctreeState< T >::mChild, and OCT_ERRS.

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

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

Reimplemented in LLOctreeRoot< T >.

Definition at line 506 of file lloctree.h.

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

template<class T>
virtual void LLOctreeState< T >::checkAlive (  )  [inline, virtual]

Definition at line 575 of file lloctree.h.

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

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

template<class T>
virtual void LLOctreeState< T >::clearChildren (  )  [inline, virtual]

Definition at line 485 of file lloctree.h.

References LLOctreeState< T >::mChild.

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

template<class T>
virtual void LLOctreeState< T >::deleteChild ( oct_node node  )  [inline, virtual]

Definition at line 588 of file lloctree.h.

References LLOctreeState< T >::getChild(), LLOctreeState< T >::getChildCount(), i, llendl, OCT_ERRS, LLOctreeState< T >::removeChild(), and TRUE.

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

template<class T>
virtual void LLOctreeState< T >::destroy (  )  [inline, virtual]

Definition at line 511 of file lloctree.h.

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

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

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

Definition at line 277 of file lloctree.h.

References LLOctreeState< T >::mChild.

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

Definition at line 276 of file lloctree.h.

References LLOctreeState< T >::mChild.

Referenced by LLOctreeState< T >::deleteChild(), LLOctreeNode< T >::getChild(), LLOctreeState< T >::insert(), LLOctreeState< T >::removeByAddress(), LLOctreeState< T >::removeChild(), LLOctreeRenderNonOccluded::traverse(), LLOctreeTraveler< T >::traverse(), and LLOctreeState< T >::~LLOctreeState().

template<class T>
virtual U32 LLOctreeState< T >::getChildCount (  )  const [inline, virtual]

Definition at line 275 of file lloctree.h.

References LLOctreeState< T >::mChild.

Referenced by LLOctreeState< T >::addChild(), LLOctreeState< T >::checkAlive(), LLOctreeCull::checkObjects(), LLOctreeState< T >::deleteChild(), LLOctreeState< T >::destroy(), LLOctreeNode< T >::getChildCount(), LLOctreeRoot< T >::insert(), LLOctreeState< T >::insert(), LLOctreeState< T >::removeByAddress(), LLOctreeRenderNonOccluded::traverse(), LLOctreeTraveler< T >::traverse(), LLOctreeState< T >::validate(), and LLOctreeState< T >::~LLOctreeState().

template<class T>
virtual const child_list& LLOctreeState< T >::getChildren (  )  const [inline, virtual]

Definition at line 279 of file lloctree.h.

References LLOctreeState< T >::mChild.

template<class T>
virtual child_list& LLOctreeState< T >::getChildren (  )  [inline, virtual]

Definition at line 278 of file lloctree.h.

References LLOctreeState< T >::mChild.

template<class T>
virtual const element_list& LLOctreeState< T >::getData (  )  const [inline, virtual]

Definition at line 273 of file lloctree.h.

References LLOctreeState< T >::mData.

template<class T>
virtual element_list& LLOctreeState< T >::getData (  )  [inline, virtual]

Definition at line 272 of file lloctree.h.

References LLOctreeState< T >::mData.

Referenced by LLSpatialGroup::boundObjects(), LLOctreeSelect::processGroup(), LLOctreePick::visit(), LLOctreeRenderNonOccluded::visit(), and LLOctreeGet::visit().

template<class T>
virtual U32 LLOctreeState< T >::getElementCount (  )  const [inline, virtual]

Definition at line 271 of file lloctree.h.

References LLOctreeState< T >::mData.

Referenced by LLOctreeState< T >::checkAlive(), LLOctreeCull::checkObjects(), LLOctreeNode< T >::getElementCount(), and LLOctreeState< T >::insert().

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

Definition at line 291 of file lloctree.h.

References LLOctreeNode< T >::contains(), FALSE, LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), LLOctreeState< T >::getNodeAt(), LLOctreeNode< T >::getOctant(), LLOctreeState< T >::getOctNode(), LLOctreeNode< T >::getParent(), LLOctreeNode< T >::getSize(), i, LLOctreeNode< T >::isInside(), LLVector3d::mdV, and TRUE.

template<class T>
virtual oct_node* LLOctreeState< T >::getNodeAt ( T *  data  )  [inline, virtual]

Definition at line 286 of file lloctree.h.

Referenced by LLOctreeState< T >::getNodeAt(), LLOctreeNode< T >::getNodeAt(), and LLOctreeState< T >::remove().

template<class T>
oct_node* LLOctreeState< T >::getOctNode (  )  [inline]

Reimplemented in LLOctreeRoot< T >.

Definition at line 284 of file lloctree.h.

References LLTreeState< T >::getNode().

template<class T>
const oct_node* LLOctreeState< T >::getOctNode (  )  const [inline]

Definition at line 283 of file lloctree.h.

References LLTreeState< T >::getNode().

Referenced by LLOctreeState< T >::addChild(), LLOctreeState< T >::checkAlive(), LLOctreeState< T >::getNodeAt(), LLOctreeRoot< T >::getOctNode(), LLOctreeState< T >::insert(), LLOctreeState< T >::remove(), LLOctreeState< T >::removeByAddress(), LLOctreeState< T >::removeChild(), and LLOctreeState< T >::validate().

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

Implements LLTreeState< T >.

Reimplemented in LLOctreeRoot< T >.

Definition at line 327 of file lloctree.h.

References LLOctreeState< T >::addChild(), LLOctreeNode< T >::contains(), LLOctreeNode< T >::getCenter(), LLOctreeState< T >::getChild(), LLOctreeState< T >::getChildCount(), LLOctreeNode< T >::getElementCount(), LLOctreeState< T >::getElementCount(), LLOctreeState< T >::getOctNode(), LLOctreeNode< T >::getOctParent(), LLOctreeNode< T >::getSize(), i, LLOctreeState< T >::insert(), LLTreeNode< T >::insert(), LLOctreeNode< T >::isInside(), LL_OCTREE_MAX_CAPACITY, llendl, llwarns, LLOctreeState< T >::mChild, LLOctreeState< T >::mData, LLVector3d::mdV, NULL, OCT_ERRS, LLOctreeNode< T >::pushCenter(), and size.

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

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

Definition at line 269 of file lloctree.h.

References LLOctreeState< T >::mChild.

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

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

Implements LLTreeState< T >.

Definition at line 430 of file lloctree.h.

References LLOctreeState< T >::checkAlive(), LLOctreeState< T >::getNodeAt(), LLOctreeState< T >::getOctNode(), LLOctreeNode< T >::getOctParent(), LLOctreeNode< T >::isInside(), llendl, llwarns, LLOctreeState< T >::mData, LLTreeNode< T >::notifyRemoval(), NULL, LLTreeNode< T >::remove(), and LLOctreeNode< T >::removeByAddress().

template<class T>
virtual void LLOctreeState< T >::removeByAddress ( T *  data  )  [inline, virtual]

Definition at line 467 of file lloctree.h.

References LLOctreeState< T >::checkAlive(), LLOctreeState< T >::getChild(), LLOctreeState< T >::getChildCount(), LLOctreeState< T >::getOctNode(), i, llendl, llwarns, LLOctreeState< T >::mData, and LLTreeNode< T >::notifyRemoval().

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

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

Definition at line 556 of file lloctree.h.

References LLOctreeState< T >::checkAlive(), LLOctreeState< T >::destroy(), LLOctreeState< T >::getChild(), LLTreeNode< T >::getListenerCount(), LLOctreeNode< T >::getOctListener(), LLOctreeState< T >::getOctNode(), LLOctreeListener< T >::handleChildRemoval(), i, and LLOctreeState< T >::mChild.

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

template<class T>
virtual void LLOctreeState< T >::validate (  )  [inline, virtual]

Definition at line 490 of file lloctree.h.

References LLOctreeState< T >::getChildCount(), LLOctreeState< T >::getOctNode(), i, llendl, llerrs, and LLOctreeState< T >::mChild.

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


Member Data Documentation

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

Definition at line 603 of file lloctree.h.

Referenced by LLOctreeState< T >::addChild(), LLOctreeRoot< T >::balance(), LLOctreeState< T >::clearChildren(), LLOctreeState< T >::destroy(), LLOctreeState< T >::getChild(), LLOctreeState< T >::getChildCount(), LLOctreeState< T >::getChildren(), LLOctreeState< T >::insert(), LLOctreeState< T >::isLeaf(), LLOctreeState< T >::removeChild(), and LLOctreeState< T >::validate().

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

Definition at line 604 of file lloctree.h.

Referenced by LLOctreeState< T >::getData(), LLOctreeState< T >::getElementCount(), LLOctreeState< T >::insert(), LLOctreeState< T >::remove(), and LLOctreeState< T >::removeByAddress().


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