#include <llspatialpartition.h>
Inheritance diagram for LLSpatialPartition:
Definition at line 275 of file llspatialpartition.h.
typedef std::queue<LLPointer<LLSpatialGroup> > LLSpatialPartition::spatial_group_queue_t [protected] |
Definition at line 322 of file llspatialpartition.h.
typedef std::set<LLPointer<LLSpatialGroup> > LLSpatialPartition::spatial_group_set_t [protected] |
Definition at line 318 of file llspatialpartition.h.
LLSpatialPartition::LLSpatialPartition | ( | U32 | data_mask, | |
BOOL | is_volatile = FALSE , |
|||
U32 | mBufferUsage = GL_STATIC_DRAW_ARB | |||
) |
Definition at line 1085 of file llspatialpartition.cpp.
References FALSE, mBufferUsage, mDepthMask, mDrawableType, mImageEnabled, mLODPeriod, mLODSeed, mOctree, mPartitionType, mRenderByGroup, mSlopRatio, LLMemType::MTYPE_SPACE_PARTITION, mVertexDataMask, mVolatile, NULL, LLPipeline::PARTITION_NONE, and TRUE.
LLSpatialPartition::~LLSpatialPartition | ( | ) | [virtual] |
Definition at line 1107 of file llspatialpartition.cpp.
References i, mOcclusionQueries, mOctree, LLMemType::MTYPE_SPACE_PARTITION, and NULL.
virtual LLSpatialBridge* LLSpatialPartition::asBridge | ( | ) | [inline, virtual] |
Reimplemented in LLSpatialBridge.
Definition at line 305 of file llspatialpartition.h.
References NULL.
Referenced by isBridge(), and LLSpatialGroup::validate().
void LLSpatialPartition::buildOcclusion | ( | ) |
Definition at line 2061 of file llspatialpartition.cpp.
References f, FALSE, LLFastTimer::FTM_REBUILD_OCCLUSION_VB, i, LLPointer< Type >::isNull(), llmin(), mOccludedList, mOcclusionIndices, LLSpatialGroup::OCCLUSION_DIRTY, r, SG_OCCLUSION_FUDGE, and TRUE.
F32 LLSpatialPartition::calcDistance | ( | LLSpatialGroup * | group, | |
LLCamera & | camera | |||
) | [virtual] |
Definition at line 795 of file llspatialpartition.cpp.
References LLSpatialGroup::ALPHA_DIRTY, LLSpatialGroup::BELOW_WATER, LLSpatialGroup::clearState(), f, gAgent, LLCoordFrame::getAtAxis(), LLCoordFrame::getOrigin(), LLAgent::getRegion(), LLViewerRegion::getWaterHeight(), i, LLSpatialGroup::isState(), LLVector3::magVec(), LLSpatialGroup::mDepth, LLSpatialGroup::mDrawMap, LLSpatialGroup::mLastUpdateViewAngle, LLSpatialGroup::mObjectBounds, LLVector3::mV, LLSpatialGroup::mViewAngle, LLVector3::normVec(), LLRenderPass::PASS_ALPHA, LLSpatialGroup::setState(), and v.
Referenced by LLSpatialGroup::updateDistance().
F32 LLSpatialPartition::calcPixelArea | ( | LLSpatialGroup * | group, | |
LLCamera & | camera | |||
) | [virtual] |
Reimplemented in LLParticlePartition, and LLHUDBridge.
Definition at line 861 of file llspatialpartition.cpp.
References LLPipeline::calcPixelArea(), and LLSpatialGroup::mObjectBounds.
Referenced by LLSpatialGroup::updateDistance().
BOOL LLSpatialPartition::checkOcclusion | ( | LLSpatialGroup * | group, | |
LLCamera * | camera | |||
) |
Definition at line 1244 of file llspatialpartition.cpp.
References LLSpatialGroup::ACTIVE_OCCLUSION, earlyFail(), FALSE, LLSpatialGroup::isState(), mQueryQueue, LLSpatialGroup::OCCLUDED, LLSpatialGroup::setState(), LLPipeline::sUseOcclusion, and TRUE.
Referenced by LLOctreeCull::preprocess(), and processOcclusion().
S32 LLSpatialPartition::cull | ( | LLCamera & | camera, | |
std::vector< LLDrawable * > * | results = NULL , |
|||
BOOL | for_select = FALSE | |||
) |
Definition at line 1570 of file llspatialpartition.cpp.
References LLFastTimer::FTM_CULL_REBOUND, LLFastTimer::FTM_FRUSTUM_CULL, LLTreeNode< T >::getListener(), mOctree, LLMemType::MTYPE_SPACE_PARTITION, LLSpatialGroup::rebound(), and LLOctreeCull::traverse().
Referenced by LLToolSelectRect::handleRectangleSelection(), renderDebug(), and LLViewerObjectList::renderObjectsForSelect().
Definition at line 2125 of file llspatialpartition.cpp.
References LLGLState::checkClientArrays(), LLSpatialGroup::clearState(), LLPipeline::disableLights(), LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::EARLY_FAIL, earlyFail(), LLFastTimer::FTM_RENDER_OCCLUSION, LLTreeNode< T >::getListener(), glColor4f, glDrawRangeElements, glGetBooleanv, gPipeline, i, LLSpatialGroup::isDead(), j, LL_OCTREE_PARANOIA_CHECK, LLVertexBuffer::MAP_VERTEX, mask, mOccludedList, mOcclusionIndices, mOcclusionQueries, LLSpatialGroup::mOcclusionVerts, mOctree, LLPipeline::mTrianglesDrawn, LLMemType::MTYPE_SPACE_PARTITION, LLSpatialGroup::QUERY_OUT, LLSpatialGroup::setState(), sg_assert(), stop_glerror, t, and LLSpatialGroup::validate().
S32 LLSpatialPartition::getDrawables | ( | const LLVector3 & | pos, | |
F32 | rad, | |||
LLDrawable::drawable_set_t & | results, | |||
BOOL | get_lights | |||
) | [protected] |
Definition at line 2296 of file llspatialpartition.cpp.
References mOctree, LLMemType::MTYPE_SPACE_PARTITION, and LLOctreeGet::traverse().
Referenced by getLights(), and getObjects().
S32 LLSpatialPartition::getLights | ( | const LLVector3 & | pos, | |
F32 | rad, | |||
LLDrawable::drawable_set_t & | results | |||
) |
Definition at line 2315 of file llspatialpartition.cpp.
References getDrawables(), and TRUE.
Referenced by LLDrawable::updateLightSet().
S32 LLSpatialPartition::getObjects | ( | const LLVector3 & | pos, | |
F32 | rad, | |||
LLDrawable::drawable_set_t & | results | |||
) |
Definition at line 2308 of file llspatialpartition.cpp.
References FALSE, getDrawables(), LLTreeNode< T >::getListener(), mOctree, and LLSpatialGroup::rebound().
Referenced by LLDrawable::updateLightSet().
virtual BOOL LLSpatialPartition::isBridge | ( | ) | [inline, virtual] |
Definition at line 2803 of file llspatialpartition.cpp.
References FALSE, gCamera, LLCamera::sphereInFrustum(), TRUE, and v.
BOOL LLSpatialPartition::isVolatile | ( | ) | const [inline] |
Definition at line 303 of file llspatialpartition.h.
References mVolatile.
Referenced by LLSpatialGroup::rebound().
void LLSpatialPartition::markReimage | ( | LLSpatialGroup * | group | ) |
Definition at line 1669 of file llspatialpartition.cpp.
References LLSpatialGroup::IMAGE_DIRTY, LLSpatialGroup::IN_IMAGE_QUEUE, LLSpatialGroup::isState(), mImageEnabled, mImageQueue, and LLSpatialGroup::setState().
Referenced by LLOctreeCull::preprocess().
void LLSpatialPartition::move | ( | LLDrawable * | drawablep, | |
LLSpatialGroup * | curp, | |||
BOOL | immediate = FALSE | |||
) | [virtual] |
Reimplemented in LLSpatialBridge.
Definition at line 1178 of file llspatialpartition.cpp.
References assert_octree_valid, FALSE, LLFastTimer::FTM_UPDATE_MOVE, LLSpatialGroup::isVisible(), llendl, mOctree, LLSpatialGroup::mSpatialPartition, LLMemType::MTYPE_SPACE_PARTITION, OCT_ERRS, put(), remove(), t, and LLSpatialGroup::updateInGroup().
Referenced by LLSpatialBridge::move(), LLDrawable::movePartition(), and LLSpatialBridge::updateMove().
LLDrawable * LLSpatialPartition::pickDrawable | ( | const LLVector3 & | start, | |
const LLVector3 & | end, | |||
LLVector3 & | collision | |||
) |
Definition at line 2873 of file llspatialpartition.cpp.
References LLOctreePick::check(), end, LLOctreePick::mEnd, mOctree, LLVector3::setVec(), and start.
Definition at line 1681 of file llspatialpartition.cpp.
References LLPipeline::blurReflectionMap(), f, LLPipeline::generateReflectionMap(), LLSpatialGroup::GEOM_DIRTY, LLControlGroup::getS32(), gPipeline, gSavedSettings, LLSpatialGroup::IMAGE_DIRTY, LLSpatialGroup::IN_IMAGE_QUEUE, LLPointer< Type >::isNull(), LLPipeline::mCubeBuffer, mImageEnabled, mImageQueue, NULL, S32, LLPipeline::sDynamicReflections, LLCamera::setFar(), and LLCoordFrame::setOrigin().
Referenced by display().
Definition at line 1764 of file llspatialpartition.cpp.
References LLSpatialGroup::ACTIVE_OCCLUSION, checkOcclusion(), LLSpatialGroup::clearState(), count, LLSpatialGroup::CULLED, LLSpatialGroup::DEACTIVATE_OCCLUSION, LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::EARLY_FAIL, earlyFail(), LLFastTimer::FTM_CULL_REBOUND, LLFastTimer::FTM_OCCLUSION, LLFastTimer::FTM_OCCLUSION_READBACK, LLOctreeNode< T >::getChild(), LLOctreeNode< T >::getChildCount(), LLTreeNode< T >::getListener(), i, LLSpatialGroup::IN_QUEUE, LLSpatialGroup::isDead(), LLSpatialGroup::isState(), j, LL_OCTREE_PARANOIA_CHECK, llendl, mOccludedList, mOcclusionQueries, mOcclusionQueue, mOctree, LLSpatialGroup::mOctreeNode, mQueryQueue, LLMemType::MTYPE_SPACE_PARTITION, LLSpatialGroup::OCCLUDED, LLSpatialGroup::OCCLUDING, OCT_ERRS, LLSpatialGroup::QUERY_OUT, LLSpatialGroup::rebound(), LLSpatialGroup::setState(), sg_assert(), LLSpatialGroup::STATE_MODE_BRANCH, LLSpatialGroup::STATE_MODE_DIFF, stop_glerror, t, LLOctreeClearOccludedNotActive::traverse(), and validate_occlusion_list().
LLSpatialGroup * LLSpatialPartition::put | ( | LLDrawable * | drawablep, | |
BOOL | was_visible = FALSE | |||
) |
Definition at line 1121 of file llspatialpartition.cpp.
References assert_octree_valid, LLSpatialGroup::DISCARD_QUERY, LLTreeNode< T >::getListener(), LLOctreeNode< T >::getNodeAt(), LLDrawable::getPositionGroup(), LLDrawable::getVObj(), LLTreeNode< T >::insert(), LLSpatialGroup::isState(), llendl, llinfos, llwarns, LLVector3d::magVecSquared(), mOctree, LLMemType::MTYPE_SPACE_PARTITION, NULL, LLSpatialGroup::QUERY_OUT, LLSpatialGroup::setState(), LLDrawable::updateSpatialExtents(), and validate_drawable.
Referenced by LLSpatialBridge::LLSpatialBridge(), and move().
void LLSpatialPartition::rebuildGeom | ( | LLSpatialGroup * | group | ) | [virtual] |
Implements LLGeometryManager.
Reimplemented in LLVolumePartition, and LLVolumeBridge.
Definition at line 416 of file llspatialpartition.cpp.
References LLGeometryManager::addGeometryCount(), LLSpatialGroup::changeLOD(), LLSpatialGroup::clearDrawMap(), LLSpatialGroup::clearState(), LLGeometryManager::createVertexBuffer(), LLFastTimer::FTM_REBUILD_VBO, LLFastTimer::FTM_REBUILD_VOLUME_VB, LLSpatialGroup::GEOM_DIRTY, LLGeometryManager::getGeometry(), gFrameTimeSeconds, LLSpatialGroup::isDead(), LLPointer< Type >::isNull(), LLSpatialGroup::isState(), LLSpatialGroup::MATRIX_DIRTY, LLSpatialGroup::mBufferMap, LLSpatialGroup::mBufferUsage, LLSpatialGroup::mBuilt, LLSpatialGroup::mDistance, LLSpatialGroup::mIndexCount, LLSpatialGroup::mLastUpdateDistance, LLSpatialGroup::mLastUpdateTime, LLSpatialGroup::mLastUpdateViewAngle, mPartitionType, LLSpatialGroup::mVertexBuffer, LLSpatialGroup::mVertexCount, mVertexDataMask, LLSpatialGroup::mViewAngle, NULL, LLVertexBuffer::sEnableVBOs, and stop_glerror.
Referenced by LLSpatialGroup::rebuildGeom().
BOOL LLSpatialPartition::remove | ( | LLDrawable * | drawablep, | |
LLSpatialGroup * | curp | |||
) |
Definition at line 1162 of file llspatialpartition.cpp.
References assert_octree_valid, llendl, mOctree, LLMemType::MTYPE_SPACE_PARTITION, NULL, OCT_ERRS, LLSpatialGroup::removeObject(), LLDrawable::setSpatialGroup(), and TRUE.
Referenced by move(), and LLSpatialBridge::~LLSpatialBridge().
void LLSpatialPartition::renderDebug | ( | ) |
Definition at line 2726 of file llspatialpartition.cpp.
References cull(), LLPipeline::disableLights(), f, gCamera, LLViewerCamera::getScreenPixelArea(), glBlendFunc, glColor4f, glDrawRangeElements, glPolygonMode, gPipeline, LLPipeline::hasRenderDebugMask(), i, LLVertexBuffer::MAP_VERTEX, mOccludedList, mOcclusionIndices, mOctree, LLMemType::MTYPE_SPACE_PARTITION, LLPointer< Type >::notNull(), LLSpatialGroup::OCCLUDED, LLPipeline::RENDER_DEBUG_BBOXES, LLPipeline::RENDER_DEBUG_OCCLUSION, LLPipeline::RENDER_DEBUG_OCTREE, LLPipeline::RENDER_DEBUG_POINTS, LLPipeline::RENDER_DEBUG_TEXTURE_ANIM, LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY, sCurMaxTexPriority, sLastMaxTexPriority, and LLOctreeRenderNonOccluded::traverse().
void LLSpatialPartition::resetVertexBuffers | ( | ) |
Definition at line 1562 of file llspatialpartition.cpp.
References mOcclusionIndices, mOctree, NULL, and LLOctreeTraveler< T >::traverse().
void LLSpatialPartition::restoreGL | ( | ) |
Definition at line 1540 of file llspatialpartition.cpp.
References LLSpatialGroup::DISCARD_QUERY, genBoxList(), i, mOccludedList, mOcclusionQueries, LLMemType::MTYPE_SPACE_PARTITION, and sBoxList.
Reimplemented in LLHUDPartition.
Definition at line 1236 of file llspatialpartition.cpp.
References llendl, llinfos, mOctree, LLMemType::MTYPE_SPACE_PARTITION, and LLOctreeTraveler< T >::traverse().
Definition at line 336 of file llspatialpartition.h.
Referenced by LLGeometryManager::addGeometryCount(), LLParticlePartition::addGeometryCount(), LLGrassPartition::LLGrassPartition(), LLParticlePartition::LLParticlePartition(), LLSpatialPartition(), LLTerrainPartition::LLTerrainPartition(), LLVolumeBridge::LLVolumeBridge(), LLVolumePartition::LLVolumePartition(), and LLVolumeGeometryManager::rebuildGeom().
Definition at line 344 of file llspatialpartition.h.
Referenced by LLGrassPartition::LLGrassPartition(), LLSpatialPartition(), LLVolumeBridge::LLVolumeBridge(), and LLVolumePartition::LLVolumePartition().
Definition at line 345 of file llspatialpartition.h.
Referenced by LLBridgePartition::LLBridgePartition(), LLCloudPartition::LLCloudPartition(), LLGrassPartition::LLGrassPartition(), LLHUDBridge::LLHUDBridge(), LLHUDPartition::LLHUDPartition(), LLParticlePartition::LLParticlePartition(), LLSpatialBridge::LLSpatialBridge(), LLSpatialPartition(), LLTerrainPartition::LLTerrainPartition(), LLTreePartition::LLTreePartition(), LLVolumeBridge::LLVolumeBridge(), LLVolumePartition::LLVolumePartition(), LLWaterPartition::LLWaterPartition(), LLDrawPoolAlpha::renderGroupAlpha(), and LLSpatialBridge::setVisible().
Definition at line 338 of file llspatialpartition.h.
Referenced by LLSpatialPartition(), LLVolumePartition::LLVolumePartition(), markReimage(), processImagery(), and LLVolumeGeometryManager::rebuildGeom().
spatial_group_queue_t LLSpatialPartition::mImageQueue [protected] |
Definition at line 326 of file llspatialpartition.h.
Referenced by markReimage(), and processImagery().
Definition at line 340 of file llspatialpartition.h.
Referenced by LLSpatialGroup::changeLOD(), LLBridgePartition::LLBridgePartition(), LLGrassPartition::LLGrassPartition(), LLHUDPartition::LLHUDPartition(), LLParticlePartition::LLParticlePartition(), LLSpatialGroup::LLSpatialGroup(), LLSpatialPartition(), LLTreePartition::LLTreePartition(), LLVolumeBridge::LLVolumeBridge(), and LLVolumePartition::LLVolumePartition().
Definition at line 339 of file llspatialpartition.h.
Referenced by LLSpatialGroup::LLSpatialGroup(), and LLSpatialPartition().
std::vector<LLPointer<LLSpatialGroup> > LLSpatialPartition::mOccludedList |
Definition at line 352 of file llspatialpartition.h.
Referenced by buildOcclusion(), LLSpatialGroup::clearState(), doOcclusion(), processOcclusion(), renderDebug(), and restoreGL().
Definition at line 349 of file llspatialpartition.h.
Referenced by buildOcclusion(), doOcclusion(), renderDebug(), and resetVertexBuffers().
std::vector<LLGLuint> LLSpatialPartition::mOcclusionQueries [protected] |
Definition at line 331 of file llspatialpartition.h.
Referenced by doOcclusion(), processOcclusion(), restoreGL(), and ~LLSpatialPartition().
Definition at line 334 of file llspatialpartition.h.
Referenced by cull(), doOcclusion(), getDrawables(), getObjects(), LLSpatialBridge::LLSpatialBridge(), LLSpatialPartition(), move(), pickDrawable(), processOcclusion(), put(), remove(), LLDrawPoolBump::renderActive(), renderDebug(), resetVertexBuffers(), LLSpatialBridge::setVisible(), shift(), LLSpatialBridge::updateBinRadius(), LLSpatialBridge::updateMove(), LLSpatialBridge::updateSpatialExtents(), and ~LLSpatialPartition().
Definition at line 346 of file llspatialpartition.h.
Referenced by LLBridgePartition::LLBridgePartition(), LLCloudPartition::LLCloudPartition(), LLGrassPartition::LLGrassPartition(), LLHUDBridge::LLHUDBridge(), LLHUDPartition::LLHUDPartition(), LLParticlePartition::LLParticlePartition(), LLSpatialBridge::LLSpatialBridge(), LLSpatialPartition(), LLTerrainPartition::LLTerrainPartition(), LLTreePartition::LLTreePartition(), LLVolumeBridge::LLVolumeBridge(), LLVolumePartition::LLVolumePartition(), LLWaterPartition::LLWaterPartition(), rebuildGeom(), LLSpatialBridge::updateMove(), and LLSpatialBridge::~LLSpatialBridge().
spatial_group_queue_t LLSpatialPartition::mQueryQueue [protected] |
Definition at line 329 of file llspatialpartition.h.
Referenced by checkOcclusion(), and processOcclusion().
Definition at line 337 of file llspatialpartition.h.
Referenced by LLBridgePartition::LLBridgePartition(), LLSpatialPartition(), LLTerrainPartition::LLTerrainPartition(), LLTreePartition::LLTreePartition(), LLWaterPartition::LLWaterPartition(), LLSpatialGroup::makeStatic(), LLPipeline::markNotCulled(), renderOctree(), LLOctreeRenderNonOccluded::traverse(), LLSpatialGroup::updateDistance(), and LLOctreeDirty::visit().
Definition at line 342 of file llspatialpartition.h.
Referenced by LLSpatialGroup::changeLOD(), LLBridgePartition::LLBridgePartition(), LLGrassPartition::LLGrassPartition(), LLHUDBridge::LLHUDBridge(), LLHUDPartition::LLHUDPartition(), LLParticlePartition::LLParticlePartition(), LLSpatialPartition(), LLTreePartition::LLTreePartition(), LLVolumeBridge::LLVolumeBridge(), and LLVolumePartition::LLVolumePartition().
Definition at line 319 of file llspatialpartition.h.
Definition at line 341 of file llspatialpartition.h.
Referenced by LLSpatialPartition(), LLVolumeGeometryManager::rebuildGeom(), and rebuildGeom().
Definition at line 343 of file llspatialpartition.h.
Referenced by isVolatile(), and LLSpatialPartition().