LLSpatialGroup Class Reference

#include <llspatialpartition.h>

Inheritance diagram for LLSpatialGroup:

Inheritance graph
[legend]
Collaboration diagram for LLSpatialGroup:

Collaboration graph
[legend]

List of all members.

Public Types

enum  eSpatialState {
  OCCLUDED = 0x00000001, IN_QUEUE = 0x00000002, QUERY_PENDING = 0x00000004, ACTIVE_OCCLUSION = 0x00000008,
  DISCARD_QUERY = 0x00000010, DEAD = 0x00000020, EARLY_FAIL = 0x00000040, DIRTY = 0x00000080,
  OBJECT_DIRTY = 0x00000100, GEOM_DIRTY = 0x00000200, ALPHA_DIRTY = 0x00000800, SKIP_FRUSTUM_CHECK = 0x00001000,
  IN_IMAGE_QUEUE = 0x00002000, IMAGE_DIRTY = 0x00004000, OCCLUSION_DIRTY = 0x00008000, MESH_DIRTY = 0x00010000
}
enum  eSetStateMode { STATE_MODE_SINGLE = 0, STATE_MODE_BRANCH, STATE_MODE_DIFF }
typedef std::vector< LLPointer
< LLSpatialGroup > > 
sg_vector_t
typedef std::set< LLPointer
< LLSpatialGroup > > 
sg_set_t
typedef std::vector< LLPointer
< LLSpatialBridge > > 
bridge_list_t
typedef std::vector< LLPointer
< LLDrawInfo > > 
drawmap_elem_t
typedef std::map< U32,
drawmap_elem_t
draw_map_t
typedef std::vector< LLPointer
< LLVertexBuffer > > 
buffer_list_t
typedef std::map< LLPointer
< LLViewerImage >
, buffer_list_t
buffer_map_t
typedef LLOctreeListener
< LLDrawable
BaseType
typedef LLOctreeListener
< LLDrawable
OctreeListener
typedef LLTreeNode< LLDrawableTreeNode
typedef LLOctreeNode< LLDrawableOctreeNode
typedef LLOctreeRoot< LLDrawableOctreeRoot
typedef LLOctreeTraveler
< LLDrawable
OctreeTraveler
typedef LLOctreeNode
< LLDrawable >::element_iter 
element_iter
typedef LLOctreeNode
< LLDrawable >::element_list 
element_list

Public Member Functions

 LLSpatialGroup (OctreeNode *node, LLSpatialPartition *part)
BOOL isDead ()
BOOL isState (U32 state) const
U32 getState ()
void setState (U32 state)
void clearState (U32 state)
void clearDrawMap ()
void validate ()
void checkStates ()
void validateDrawMap ()
void setState (U32 state, S32 mode)
LLSpatialGroupgetParent ()
void clearState (U32 state, S32 mode)
BOOL addObject (LLDrawable *drawablep, BOOL add_all=FALSE, BOOL from_octree=FALSE)
BOOL removeObject (LLDrawable *drawablep, BOOL from_octree=FALSE)
BOOL updateInGroup (LLDrawable *drawablep, BOOL immediate=FALSE)
BOOL isVisible () const
void setVisible ()
void shift (const LLVector3 &offset)
BOOL boundObjects (BOOL empty, LLVector3 &newMin, LLVector3 &newMax)
void unbound ()
BOOL rebound ()
void buildOcclusion ()
void checkOcclusion ()
void doOcclusion (LLCamera *camera)
void destroyGL ()
void updateDistance (LLCamera &camera)
BOOL needsUpdate ()
BOOL changeLOD ()
void rebuildGeom ()
void dirtyGeom ()
void dirtyMesh ()
element_listgetData ()
U32 getElementCount () const
virtual void handleInsertion (const TreeNode *node, LLDrawable *face)
virtual void handleRemoval (const TreeNode *node, LLDrawable *face)
virtual void handleDestruction (const TreeNode *node)
virtual void handleStateChange (const TreeNode *node)
virtual void handleChildAddition (const OctreeNode *parent, OctreeNode *child)
virtual void handleChildRemoval (const OctreeNode *parent, const OctreeNode *child)

Public Attributes

bridge_list_t mBridgeList
buffer_map_t mBufferMap
F32 mBuilt
OctreeNodemOctreeNode
LLSpatialPartitionmSpatialPartition
LLVector3 mBounds [2]
LLVector3 mExtents [2]
LLVector3 mObjectExtents [2]
LLVector3 mObjectBounds [2]
LLPointer< LLVertexBuffermVertexBuffer
F32mOcclusionVerts
GLuint mOcclusionQuery
LLPointer< LLCubeMapmReflectionMap
U32 mBufferUsage
draw_map_t mDrawMap
S32 mVisible
F32 mDistance
F32 mDepth
F32 mLastUpdateDistance
F32 mLastUpdateTime
LLVector3 mViewAngle
LLVector3 mLastUpdateViewAngle
F32 mPixelArea
F32 mRadius

Static Public Attributes

static U32 sNodeCount = 0

Protected Member Functions

virtual ~LLSpatialGroup ()

Protected Attributes

U32 mState
S32 mLODHash

Static Protected Attributes

static S32 sLODSeed

Friends

class LLSpatialPartition

Classes

struct  CompareDepthGreater
struct  CompareDistanceGreater


Detailed Description

Definition at line 125 of file llspatialpartition.h.


Member Typedef Documentation

Definition at line 131 of file llspatialpartition.h.

Definition at line 132 of file llspatialpartition.h.

Definition at line 133 of file llspatialpartition.h.

Definition at line 134 of file llspatialpartition.h.

Definition at line 135 of file llspatialpartition.h.

Definition at line 136 of file llspatialpartition.h.

Definition at line 137 of file llspatialpartition.h.

Reimplemented from LLOctreeListener< LLDrawable >.

Definition at line 139 of file llspatialpartition.h.

Definition at line 140 of file llspatialpartition.h.

Definition at line 141 of file llspatialpartition.h.

Definition at line 142 of file llspatialpartition.h.

Definition at line 143 of file llspatialpartition.h.

Definition at line 144 of file llspatialpartition.h.

Definition at line 145 of file llspatialpartition.h.

Definition at line 146 of file llspatialpartition.h.


Member Enumeration Documentation

Enumerator:
OCCLUDED 
IN_QUEUE 
QUERY_PENDING 
ACTIVE_OCCLUSION 
DISCARD_QUERY 
DEAD 
EARLY_FAIL 
DIRTY 
OBJECT_DIRTY 
GEOM_DIRTY 
ALPHA_DIRTY 
SKIP_FRUSTUM_CHECK 
IN_IMAGE_QUEUE 
IMAGE_DIRTY 
OCCLUSION_DIRTY 
MESH_DIRTY 

Definition at line 164 of file llspatialpartition.h.

Enumerator:
STATE_MODE_SINGLE 
STATE_MODE_BRANCH 
STATE_MODE_DIFF 

Definition at line 184 of file llspatialpartition.h.


Constructor & Destructor Documentation

LLSpatialGroup::LLSpatialGroup ( OctreeNode node,
LLSpatialPartition part 
)

LLSpatialGroup::~LLSpatialGroup (  )  [protected, virtual]


Member Function Documentation

BOOL LLSpatialGroup::isDead (  )  [inline]

Definition at line 193 of file llspatialpartition.h.

References DEAD, and isState().

Referenced by getParent(), LLSpatialPartition::rebuildGeom(), rebuildGeom(), LLDrawPoolAlpha::renderAlpha(), LLDrawPoolAlpha::renderAlphaHighlight(), LLPipeline::renderGroups(), and validate().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLSpatialGroup::isState ( U32  state  )  const [inline]

U32 LLSpatialGroup::getState (  )  [inline]

Definition at line 195 of file llspatialpartition.h.

References mState.

Referenced by LLOctreeStateCheck::traverse().

Here is the caller graph for this function:

void LLSpatialGroup::setState ( U32  state  ) 

void LLSpatialGroup::clearState ( U32  state  ) 

void LLSpatialGroup::clearDrawMap (  ) 

void LLSpatialGroup::validate (  ) 

void LLSpatialGroup::checkStates (  ) 

Definition at line 447 of file llspatialpartition.cpp.

References mOctreeNode, and LLOctreeStateCheck::traverse().

Here is the call graph for this function:

void LLSpatialGroup::validateDrawMap (  ) 

Definition at line 499 of file llspatialpartition.cpp.

References i, j, mDrawMap, and validate_draw_info().

Referenced by validate().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::setState ( U32  state,
S32  mode 
)

LLSpatialGroup * LLSpatialGroup::getParent (  ) 

Definition at line 725 of file llspatialpartition.cpp.

References LLTreeNode< T >::getListener(), LLOctreeNode< T >::getOctParent(), isDead(), mOctreeNode, and NULL.

Referenced by LLOctreeStateCheck::assert_parent_state(), checkOcclusion(), LLPipeline::markOccluder(), and LLVolumeGeometryManager::rebuildGeom().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::clearState ( U32  state,
S32  mode 
)

BOOL LLSpatialGroup::addObject ( LLDrawable drawablep,
BOOL  add_all = FALSE,
BOOL  from_octree = FALSE 
)

BOOL LLSpatialGroup::removeObject ( LLDrawable drawablep,
BOOL  from_octree = FALSE 
)

BOOL LLSpatialGroup::updateInGroup ( LLDrawable drawablep,
BOOL  immediate = FALSE 
)

BOOL LLSpatialGroup::isVisible (  )  const

Definition at line 321 of file llspatialpartition.cpp.

References FALSE, LLDrawable::getCurrentFrame(), mVisible, and TRUE.

Referenced by LLDrawable::isVisible(), LLSpatialPartition::move(), renderVisibility(), and LLViewerPartSim::updateSimulation().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::setVisible (  ) 

Definition at line 326 of file llspatialpartition.cpp.

References LLDrawable::getCurrentFrame(), mVisible, and LLSpatialPartition::sFreezeState.

Referenced by LLPipeline::markNotCulled(), LLPipeline::stateSort(), and LLOctreeMarkNotCulled::traverse().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::shift ( const LLVector3 offset  ) 

BOOL LLSpatialGroup::boundObjects ( BOOL  empty,
LLVector3 newMin,
LLVector3 newMax 
)

Definition at line 624 of file llspatialpartition.cpp.

References clearState(), FALSE, LLOctreeNode< T >::getData(), LLOctreeNode< T >::getParent(), LLDrawable::getSpatialExtents(), i, isState(), llendl, mObjectBounds, mObjectExtents, mOctreeNode, LLVector3::mV, OBJECT_DIRTY, OCT_ERRS, LLVector3::setVec(), and TRUE.

Referenced by rebound().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::unbound (  ) 

Definition at line 698 of file llspatialpartition.cpp.

References DIRTY, LLTreeNode< T >::getListener(), LLOctreeNode< T >::getParent(), isState(), mOctreeNode, NULL, and setState().

Referenced by handleChildAddition(), handleChildRemoval(), handleInsertion(), handleStateChange(), removeObject(), and updateInGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLSpatialGroup::rebound (  ) 

void LLSpatialGroup::buildOcclusion (  ) 

Definition at line 207 of file llspatialpartition.cpp.

References clearState(), llmin(), mBounds, mOcclusionVerts, LLVector3::mV, OCCLUSION_DIRTY, r, and SG_OCCLUSION_FUDGE.

Referenced by doOcclusion().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::checkOcclusion (  ) 

void LLSpatialGroup::doOcclusion ( LLCamera camera  ) 

void LLSpatialGroup::destroyGL (  ) 

void LLSpatialGroup::updateDistance ( LLCamera camera  ) 

BOOL LLSpatialGroup::needsUpdate (  ) 

Definition at line 1044 of file llspatialpartition.cpp.

References FALSE, LLDrawable::getCurrentFrame(), mLODHash, LLSpatialPartition::mLODPeriod, mSpatialPartition, and TRUE.

Referenced by changeLOD(), LLPipeline::markOccluder(), and LLOctreeCull::processGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLSpatialGroup::changeLOD (  ) 

an alpha sort is going to happen, update distance and LOD

Definition at line 1049 of file llspatialpartition.cpp.

References ALPHA_DIRTY, FALSE, isState(), llmax(), mDistance, mLastUpdateDistance, mRadius, LLSpatialPartition::mSlopRatio, mSpatialPartition, needsUpdate(), and TRUE.

Referenced by LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and LLPipeline::stateSort().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::rebuildGeom (  ) 

Definition at line 565 of file llspatialpartition.cpp.

References isDead(), mSpatialPartition, LLMemType::MTYPE_SPACE_PARTITION, and LLSpatialPartition::rebuildGeom().

Referenced by LLPipeline::postSort().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::dirtyGeom (  )  [inline]

Definition at line 228 of file llspatialpartition.h.

References GEOM_DIRTY, and setState().

Referenced by LLViewerObject::dirtySpatialGroup(), and LLManip::rebuild().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::dirtyMesh (  )  [inline]

Definition at line 229 of file llspatialpartition.h.

References MESH_DIRTY, and setState().

Referenced by LLViewerObject::dirtyMesh().

Here is the call graph for this function:

Here is the caller graph for this function:

element_list& LLSpatialGroup::getData (  )  [inline]

U32 LLSpatialGroup::getElementCount (  )  const [inline]

Definition at line 231 of file llspatialpartition.h.

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

Referenced by LLPipeline::markOccluder(), and removeObject().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpatialGroup::handleInsertion ( const TreeNode node,
LLDrawable face 
) [virtual]

Definition at line 1079 of file llspatialpartition.cpp.

References addObject(), FALSE, LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, setState(), TRUE, and unbound().

Here is the call graph for this function:

void LLSpatialGroup::handleRemoval ( const TreeNode node,
LLDrawable face 
) [virtual]

Definition at line 1087 of file llspatialpartition.cpp.

References LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, removeObject(), setState(), and TRUE.

Here is the call graph for this function:

void LLSpatialGroup::handleDestruction ( const TreeNode node  )  [virtual]

void LLSpatialGroup::handleStateChange ( const TreeNode node  )  [virtual]

Definition at line 1115 of file llspatialpartition.cpp.

References mOctreeNode, and unbound().

Here is the call graph for this function:

void LLSpatialGroup::handleChildAddition ( const OctreeNode parent,
OctreeNode child 
) [virtual]

void LLSpatialGroup::handleChildRemoval ( const OctreeNode parent,
const OctreeNode child 
) [virtual]

Implements LLOctreeListener< LLDrawable >.

Definition at line 1143 of file llspatialpartition.cpp.

References unbound().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class LLSpatialPartition [friend]

Definition at line 127 of file llspatialpartition.h.


Member Data Documentation

Definition at line 129 of file llspatialpartition.h.

Referenced by LLSpatialGroup(), LLDebugText::update(), and ~LLSpatialGroup().

Definition at line 245 of file llspatialpartition.h.

Referenced by LLSpatialGroup(), and needsUpdate().

S32 LLSpatialGroup::sLODSeed [static, protected]

Definition at line 246 of file llspatialpartition.h.

Definition at line 256 of file llspatialpartition.h.

Referenced by LLOctreeCull::frustumCheck(), rebound(), and shift().

Definition at line 258 of file llspatialpartition.h.

Referenced by boundObjects(), LLOctreeCull::frustumCheckObjects(), and shift().

Definition at line 269 of file llspatialpartition.h.

Referenced by isVisible(), LLOctreeCull::processGroup(), and setVisible().

Definition at line 278 of file llspatialpartition.h.

Referenced by LLSpatialGroup(), LLPipeline::markNotCulled(), and updateDistance().

Definition at line 279 of file llspatialpartition.h.

Referenced by changeLOD(), LLSpatialGroup(), and updateDistance().


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

Generated on Fri May 16 09:06:00 2008 for SecondLife by  doxygen 1.5.5