#include <llspatialpartition.h>
Inheritance diagram for LLSpatialGroup:
Definition at line 107 of file llspatialpartition.h.
Reimplemented from LLOctreeListener< LLDrawable >.
Definition at line 119 of file llspatialpartition.h.
typedef std::vector<LLPointer<LLSpatialBridge> > LLSpatialGroup::bridge_list_t |
Definition at line 114 of file llspatialpartition.h.
typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > LLSpatialGroup::buffer_map_t |
Definition at line 117 of file llspatialpartition.h.
typedef std::map<U32, drawmap_elem_t > LLSpatialGroup::draw_map_t |
Definition at line 116 of file llspatialpartition.h.
typedef std::vector<LLPointer<LLDrawInfo> > LLSpatialGroup::drawmap_elem_t |
Definition at line 115 of file llspatialpartition.h.
Definition at line 126 of file llspatialpartition.h.
Definition at line 127 of file llspatialpartition.h.
Definition at line 120 of file llspatialpartition.h.
Definition at line 122 of file llspatialpartition.h.
Definition at line 123 of file llspatialpartition.h.
Definition at line 124 of file llspatialpartition.h.
Definition at line 125 of file llspatialpartition.h.
typedef std::set<LLPointer<LLSpatialGroup> > LLSpatialGroup::sg_set_t |
Definition at line 113 of file llspatialpartition.h.
typedef std::vector<LLPointer<LLSpatialGroup> > LLSpatialGroup::sg_vector_t |
Definition at line 112 of file llspatialpartition.h.
typedef LLTreeNode<LLDrawable> LLSpatialGroup::TreeNode |
Definition at line 121 of file llspatialpartition.h.
Definition at line 172 of file llspatialpartition.h.
Definition at line 145 of file llspatialpartition.h.
LLSpatialGroup::LLSpatialGroup | ( | OctreeNode * | node, | |
LLSpatialPartition * | part | |||
) |
Definition at line 746 of file llspatialpartition.cpp.
References LLTreeNode< T >::addListener(), LLOctreeNode< T >::getCenter(), LLTreeNode< T >::getListenerCount(), LLOctreeNode< T >::getSize(), mBounds, mLODHash, LLSpatialPartition::mLODPeriod, LLSpatialPartition::mLODSeed, mOctreeNode, mPixelArea, mRadius, LLMemType::MTYPE_SPACE_PARTITION, setState(), sg_assert(), and SG_INITIAL_STATE_MASK.
Referenced by handleChildAddition().
LLSpatialGroup::~LLSpatialGroup | ( | ) | [protected, virtual] |
Definition at line 146 of file llspatialpartition.cpp.
References clearDrawMap(), DEAD, isState(), LLMemType::MTYPE_SPACE_PARTITION, and sZombieGroups.
BOOL LLSpatialGroup::addObject | ( | LLDrawable * | drawablep, | |
BOOL | add_all = FALSE , |
|||
BOOL | from_octree = FALSE | |||
) |
Definition at line 381 of file llspatialpartition.cpp.
References GEOM_DIRTY, LLDrawable::getRadius(), gFrameTimeSeconds, IMAGE_DIRTY, LLTreeNode< T >::insert(), LLDrawable::isSpatialBridge(), mBridgeList, mLastAddTime, mOctreeNode, LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, LLDrawable::setSpatialGroup(), setState(), TRUE, and validate_drawable.
Referenced by handleInsertion().
Definition at line 471 of file llspatialpartition.cpp.
References clearState(), FALSE, LLOctreeState< T >::getData(), LLOctreeNode< T >::getOctState(), LLOctreeNode< T >::getParent(), LLDrawable::getSpatialExtents(), i, isState(), llendl, mObjectExtents, mOctreeNode, LLVector3::mV, OBJECT_DIRTY, OCT_ERRS, and LLVector3::setVec().
Referenced by rebound().
BOOL LLSpatialGroup::changeLOD | ( | ) |
Definition at line 866 of file llspatialpartition.cpp.
References ALPHA_DIRTY, FALSE, LLDrawable::getCurrentFrame(), isState(), llmax(), mDistance, mLastUpdateDistance, mLODHash, LLSpatialPartition::mLODPeriod, mRadius, LLSpatialPartition::mSlopRatio, mSpatialPartition, and TRUE.
Referenced by LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), LLPipeline::stateSort(), and LLDrawable::updateDistance().
void LLSpatialGroup::clearDrawMap | ( | ) |
Definition at line 157 of file llspatialpartition.cpp.
References mDrawMap.
Referenced by destroyGL(), LLParticlePartition::getGeometry(), handleDestruction(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and ~LLSpatialGroup().
Definition at line 706 of file llspatialpartition.cpp.
References ACTIVE_OCCLUSION, i, llendl, llerrs, LLSpatialPartition::mOccludedList, mOctreeNode, mSpatialPartition, mState, LLMemType::MTYPE_SPACE_PARTITION, STATE_MODE_DIFF, STATE_MODE_SINGLE, LLOctreeTraveler< T >::traverse(), and LLSpatialClearStateDiff::traverse().
Definition at line 185 of file llspatialpartition.h.
References mState.
Referenced by boundObjects(), LLSpatialPartition::calcDistance(), LLSpatialPartition::doOcclusion(), LLOctreeCull::preprocess(), LLSpatialPartition::processOcclusion(), rebound(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), LLOctreeClearOccludedNotActive::traverse(), and LLOctreeMarkNotCulled::traverse().
void LLSpatialGroup::destroyGL | ( | ) |
Definition at line 964 of file llspatialpartition.cpp.
References clearDrawMap(), GEOM_DIRTY, getData(), gFrameTimeSeconds, i, IMAGE_DIRTY, j, mBufferMap, mLastUpdateTime, mOcclusionVerts, mReflectionMap, mVertexBuffer, NULL, OCCLUSION_DIRTY, S32, and setState().
Referenced by LLOctreeDirty::visit().
void LLSpatialGroup::dirtyGeom | ( | ) | [inline] |
Definition at line 211 of file llspatialpartition.h.
References GEOM_DIRTY, and setState().
Referenced by LLVOPartGroup::updateGeometry().
element_list& LLSpatialGroup::getData | ( | ) | [inline] |
Definition at line 212 of file llspatialpartition.h.
References LLOctreeNode< T >::getOctState(), and mOctreeNode.
Referenced by LLGeometryManager::addGeometryCount(), LLParticlePartition::addGeometryCount(), destroyGL(), handleDestruction(), LLPipeline::markNotCulled(), LLVolumeGeometryManager::rebuildGeom(), renderOctree(), LLPipeline::stateSort(), updateDistance(), validate(), LLOctreeDirtyTexture::visit(), and LLOctreeDirty::visit().
LLSpatialGroup * LLSpatialGroup::getParent | ( | ) |
Definition at line 572 of file llspatialpartition.cpp.
References LLTreeNode< T >::getListener(), LLOctreeNode< T >::getOctParent(), isDead(), mOctreeNode, and NULL.
Referenced by LLVolumeGeometryManager::rebuildGeom().
U32 LLSpatialGroup::getState | ( | ) | [inline] |
void LLSpatialGroup::handleChildAddition | ( | const OctreeNode * | parent, | |
OctreeNode * | child | |||
) | [virtual] |
Implements LLOctreeListener< LLDrawable >.
Definition at line 943 of file llspatialpartition.cpp.
References LLTreeNode< T >::getListenerCount(), llendl, LLSpatialGroup(), mSpatialPartition, mState, LLMemType::MTYPE_SPACE_PARTITION, OCT_ERRS, SG_STATE_INHERIT_MASK, and unbound().
void LLSpatialGroup::handleChildRemoval | ( | const OctreeNode * | parent, | |
const OctreeNode * | child | |||
) | [virtual] |
Implements LLOctreeListener< LLDrawable >.
Definition at line 959 of file llspatialpartition.cpp.
References unbound().
Implements LLTreeListener< LLDrawable >.
Definition at line 911 of file llspatialpartition.cpp.
References clearDrawMap(), DEAD, getData(), i, mBufferMap, mOcclusionVerts, mOctreeNode, LLMemType::MTYPE_SPACE_PARTITION, mVertexBuffer, NULL, setState(), and sZombieGroups.
void LLSpatialGroup::handleInsertion | ( | const TreeNode * | node, | |
LLDrawable * | face | |||
) | [virtual] |
Implements LLTreeListener< LLDrawable >.
Definition at line 896 of file llspatialpartition.cpp.
References addObject(), FALSE, LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, setState(), TRUE, and unbound().
void LLSpatialGroup::handleRemoval | ( | const TreeNode * | node, | |
LLDrawable * | face | |||
) | [virtual] |
Implements LLTreeListener< LLDrawable >.
Definition at line 904 of file llspatialpartition.cpp.
References LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, removeObject(), setState(), and TRUE.
Implements LLTreeListener< LLDrawable >.
Definition at line 933 of file llspatialpartition.cpp.
References mOctreeNode, and unbound().
BOOL LLSpatialGroup::isDead | ( | ) | [inline] |
Definition at line 181 of file llspatialpartition.h.
References DEAD, and isState().
Referenced by LLSpatialPartition::doOcclusion(), getParent(), LLSpatialPartition::processOcclusion(), LLSpatialPartition::rebuildGeom(), rebuildGeom(), and validate().
Definition at line 182 of file llspatialpartition.h.
References FALSE, mState, and TRUE.
Referenced by boundObjects(), LLSpatialPartition::calcDistance(), changeLOD(), LLSpatialPartition::checkOcclusion(), LLOctreeCull::earlyFail(), isDead(), isVisible(), LLOctreeCull::lateFail(), makeStatic(), LLSpatialPartition::markReimage(), LLOctreeCull::preprocess(), LLSpatialPartition::processOcclusion(), LLSpatialPartition::put(), rebound(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), LLOctreeRenderNonOccluded::traverse(), LLQueueNonCulled::traverse(), LLOctreeClearOccludedNotActive::traverse(), LLOctreeCull::traverse(), LLSpatialClearStateDiff::traverse(), LLSpatialSetStateDiff::traverse(), unbound(), updateDistance(), validate(), validate_occlusion_list(), LLOctreeDirtyTexture::visit(), LLOctreeRenderNonOccluded::visit(), and ~LLSpatialGroup().
BOOL LLSpatialGroup::isVisible | ( | ) |
Definition at line 202 of file llspatialpartition.cpp.
References CULLED, isState(), OCCLUDED, and LLPipeline::sUseOcclusion.
Referenced by LLDrawable::isVisible(), LLSpatialPartition::move(), and LLViewerPartSim::updateSimulation().
void LLSpatialGroup::makeStatic | ( | ) |
Definition at line 330 of file llspatialpartition.cpp.
References ALPHA_DIRTY, GEOM_DIRTY, i, isState(), mBufferMap, mBufferUsage, mBuilt, LLSpatialPartition::mRenderByGroup, mSpatialPartition, mVertexBuffer, and LLPointer< Type >::notNull().
Referenced by LLPipeline::stateSort().
BOOL LLSpatialGroup::rebound | ( | ) |
Definition at line 989 of file llspatialpartition.cpp.
References boundObjects(), clearState(), DIRTY, LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), LLOctreeNode< T >::getElementCount(), LLOctreeNode< T >::hasLeafState(), i, isState(), LLSpatialPartition::isVolatile(), j, mBounds, mExtents, mObjectBounds, mOctreeNode, mSpatialPartition, LLVector3::mV, QUERY_OUT, rebound(), SKIP_FRUSTUM_CHECK, and TRUE.
Referenced by LLSpatialPartition::cull(), LLSpatialPartition::getObjects(), LLSpatialPartition::processOcclusion(), rebound(), LLSpatialBridge::setVisible(), and LLSpatialBridge::updateSpatialExtents().
void LLSpatialGroup::rebuildGeom | ( | ) |
Definition at line 407 of file llspatialpartition.cpp.
References isDead(), mSpatialPartition, LLMemType::MTYPE_SPACE_PARTITION, and LLSpatialPartition::rebuildGeom().
BOOL LLSpatialGroup::removeObject | ( | LLDrawable * | drawablep, | |
BOOL | from_octree = FALSE | |||
) |
Definition at line 589 of file llspatialpartition.cpp.
References GEOM_DIRTY, i, LLDrawable::isSpatialBridge(), llendl, mBridgeList, mOctreeNode, LLMemType::MTYPE_SPACE_PARTITION, NULL, OCT_ERRS, LLTreeNode< T >::remove(), LLDrawable::setSpatialGroup(), setState(), TRUE, and unbound().
Referenced by handleRemoval(), and LLSpatialPartition::remove().
Definition at line 659 of file llspatialpartition.cpp.
References mOctreeNode, mState, LLMemType::MTYPE_SPACE_PARTITION, STATE_MODE_DIFF, STATE_MODE_SINGLE, LLOctreeTraveler< T >::traverse(), and LLSpatialSetStateDiff::traverse().
Definition at line 184 of file llspatialpartition.h.
References mState.
Referenced by addObject(), LLSpatialPartition::calcDistance(), LLSpatialPartition::checkOcclusion(), destroyGL(), dirtyGeom(), LLSpatialPartition::doOcclusion(), handleDestruction(), handleInsertion(), handleRemoval(), LLOctreeCull::lateFail(), LLSpatialGroup(), LLSpatialPartition::markReimage(), LLSpatialPartition::processOcclusion(), LLSpatialPartition::put(), removeObject(), LLDrawable::setSpatialGroup(), shift(), LLQueueNonCulled::traverse(), LLRelightPainter::traverse(), unbound(), updateInGroup(), and LLOctreeDirtyTexture::visit().
Definition at line 619 of file llspatialpartition.cpp.
References GEOM_DIRTY, LLOctreeNode< T >::getCenter(), MATRIX_DIRTY, mBounds, mExtents, mObjectBounds, mObjectExtents, mOctreeNode, LLMemType::MTYPE_SPACE_PARTITION, OCCLUSION_DIRTY, LLOctreeNode< T >::setCenter(), setState(), and LLOctreeNode< T >::updateMinMax().
void LLSpatialGroup::unbound | ( | ) |
Definition at line 545 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().
Definition at line 778 of file llspatialpartition.cpp.
References LLSpatialPartition::calcDistance(), LLSpatialPartition::calcPixelArea(), getData(), LLOctreeNode< T >::getSize(), isState(), llendl, llerrs, LLVector3d::magVec(), LLVector3::magVec(), mDistance, mObjectBounds, mOctreeNode, mPixelArea, mRadius, LLSpatialPartition::mRenderByGroup, mSpatialPartition, and OBJECT_DIRTY.
Referenced by LLPipeline::markNotCulled().
BOOL LLSpatialGroup::updateInGroup | ( | LLDrawable * | drawablep, | |
BOOL | immediate = FALSE | |||
) |
Definition at line 356 of file llspatialpartition.cpp.
References LLOctreeNode< T >::contains(), FALSE, GEOM_DIRTY, LLDrawable::getBinRadius(), LLOctreeNode< T >::getElementCount(), LLOctreeNode< T >::getOctParent(), LLDrawable::getPositionGroup(), LLOctreeNode< T >::getSize(), LLOctreeNode< T >::isInside(), LL_OCTREE_MAX_CAPACITY, LLVector3d::mdV, mOctreeNode, LLMemType::MTYPE_SPACE_PARTITION, OBJECT_DIRTY, setState(), TRUE, unbound(), LLDrawable::updateSpatialExtents(), and validate_drawable.
Referenced by LLSpatialPartition::move().
void LLSpatialGroup::validate | ( | ) |
Definition at line 214 of file llspatialpartition.cpp.
References LLSpatialPartition::asBridge(), DIRTY, LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), getData(), i, isDead(), isState(), j, llendl, llerrs, mBounds, mOctreeNode, mSpatialPartition, LLVector3::mV, sg_assert(), size, validate(), and validateDrawMap().
Referenced by LLSpatialPartition::doOcclusion(), and validate().
void LLSpatialGroup::validateDrawMap | ( | ) |
Definition at line 314 of file llspatialpartition.cpp.
References i, j, mDrawMap, params, and validate_draw_info().
Referenced by validate().
friend class LLSpatialPartition [friend] |
Definition at line 109 of file llspatialpartition.h.
Definition at line 236 of file llspatialpartition.h.
Referenced by LLOctreePick::check(), earlyFail(), LLSpatialGroup(), rebound(), renderOctree(), shift(), LLOctreeGet::traverse(), LLOctreeCull::traverse(), LLRelightPainter::traverse(), LLSpatialBridge::updateSpatialExtents(), validate(), and LLOctreeRenderNonOccluded::visit().
Definition at line 230 of file llspatialpartition.h.
Referenced by addObject(), LLPipeline::markNotCulled(), removeObject(), LLOctreeDirtyTexture::visit(), and LLOctreeDirty::visit().
Definition at line 231 of file llspatialpartition.h.
Referenced by destroyGL(), handleDestruction(), makeStatic(), LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
Definition at line 245 of file llspatialpartition.h.
Referenced by LLGeometryManager::addGeometryCount(), LLParticlePartition::addGeometryCount(), makeStatic(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and renderOctree().
Definition at line 233 of file llspatialpartition.h.
Referenced by makeStatic(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and renderOctree().
Definition at line 251 of file llspatialpartition.h.
Referenced by LLSpatialPartition::calcDistance(), and LLSpatialGroup::CompareDepthGreater::operator()().
Definition at line 250 of file llspatialpartition.h.
Referenced by changeLOD(), LLSpatialGroup::CompareDistanceGreater::operator()(), LLOctreeCull::preprocess(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and updateDistance().
Definition at line 246 of file llspatialpartition.h.
Referenced by LLSpatialPartition::calcDistance(), clearDrawMap(), LLParticlePartition::getGeometry(), pushVerts(), pushVertsColorCoded(), LLVolumeGeometryManager::registerFace(), LLDrawPoolBump::renderGroup(), LLRenderPass::renderGroup(), LLDrawPoolAlpha::renderGroupAlpha(), LLDrawPoolBump::renderGroupBump(), validateDrawMap(), LLOctreeDirtyTexture::visit(), and LLOctreeRenderNonOccluded::visit().
Definition at line 249 of file llspatialpartition.h.
Referenced by LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
Definition at line 254 of file llspatialpartition.h.
Referenced by addObject(), and LLOctreeCull::preprocess().
Definition at line 252 of file llspatialpartition.h.
Referenced by changeLOD(), LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
Definition at line 253 of file llspatialpartition.h.
Referenced by destroyGL(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), and LLPipeline::stateSort().
Definition at line 258 of file llspatialpartition.h.
Referenced by LLSpatialPartition::calcDistance(), LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
S32 LLSpatialGroup::mLODHash [protected] |
Definition at line 226 of file llspatialpartition.h.
Referenced by changeLOD(), and LLSpatialGroup().
Definition at line 239 of file llspatialpartition.h.
Referenced by LLSpatialPartition::calcDistance(), LLSpatialPartition::calcPixelArea(), LLOctreeCull::checkObjects(), LLPipeline::postSort(), rebound(), renderOctree(), shift(), and updateDistance().
Definition at line 242 of file llspatialpartition.h.
Referenced by destroyGL(), LLSpatialPartition::doOcclusion(), and handleDestruction().
Definition at line 234 of file llspatialpartition.h.
Referenced by addObject(), boundObjects(), clearState(), LLOctreeCull::earlyFail(), getData(), getParent(), handleDestruction(), handleStateChange(), LLSpatialGroup(), LLViewerPartGroup::LLViewerPartGroup(), LLOctreeCull::preprocess(), LLOctreeSelect::processGroup(), LLSpatialPartition::processOcclusion(), rebound(), removeObject(), renderOctree(), setState(), shift(), LLOctreeClearOccludedNotActive::traverse(), unbound(), updateDistance(), updateInGroup(), validate(), and LLOctreeRenderNonOccluded::visit().
Definition at line 260 of file llspatialpartition.h.
Referenced by LLSpatialGroup(), LLPipeline::markNotCulled(), and updateDistance().
Definition at line 261 of file llspatialpartition.h.
Referenced by changeLOD(), LLSpatialGroup(), and updateDistance().
Definition at line 243 of file llspatialpartition.h.
Referenced by destroyGL(), LLVolumeGeometryManager::rebuildGeom(), and LLVolumeGeometryManager::registerFace().
Definition at line 235 of file llspatialpartition.h.
Referenced by LLGeometryManager::addGeometryCount(), changeLOD(), clearState(), handleChildAddition(), makeStatic(), LLPipeline::markNotCulled(), LLSpatialPartition::move(), LLOctreeCull::preprocess(), rebound(), LLVolumeGeometryManager::rebuildGeom(), rebuildGeom(), LLDrawPoolAlpha::renderGroupAlpha(), renderOctree(), LLOctreeRenderNonOccluded::traverse(), updateDistance(), validate(), and LLOctreeDirty::visit().
U32 LLSpatialGroup::mState [protected] |
Definition at line 225 of file llspatialpartition.h.
Referenced by clearState(), getState(), handleChildAddition(), isState(), and setState().
Definition at line 241 of file llspatialpartition.h.
Referenced by destroyGL(), LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), handleDestruction(), makeStatic(), LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
Definition at line 248 of file llspatialpartition.h.
Referenced by LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
Definition at line 257 of file llspatialpartition.h.
Referenced by LLSpatialPartition::calcDistance(), LLVolumeGeometryManager::rebuildGeom(), and LLSpatialPartition::rebuildGeom().
S32 LLSpatialGroup::sLODSeed [static, protected] |
Definition at line 227 of file llspatialpartition.h.