#include "llviewerprecompiledheaders.h"
#include "llspatialpartition.h"
#include "llviewerwindow.h"
#include "llviewerobjectlist.h"
#include "llvovolume.h"
#include "llviewercamera.h"
#include "llface.h"
#include "viewer.h"
#include "llagent.h"
#include "llviewerregion.h"
#include "llcamera.h"
#include "pipeline.h"
Include dependency graph for llspatialpartition.cpp:
Go to the source code of this file.
Copyright (c) 2003-2007, Linden Research, Inc.
Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2
There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception
By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$
Definition in file llspatialpartition.cpp.
#define assert_octree_valid | ( | x | ) |
Definition at line 57 of file llspatialpartition.cpp.
Referenced by LLSpatialPartition::move(), LLSpatialPartition::put(), and LLSpatialPartition::remove().
#define SG_DISCARD_TOLERANCE 0.25f |
Definition at line 52 of file llspatialpartition.cpp.
#define validate_drawable | ( | x | ) |
Definition at line 90 of file llspatialpartition.cpp.
Referenced by LLSpatialGroup::addObject(), LLSpatialPartition::put(), and LLSpatialGroup::updateInGroup().
Definition at line 1463 of file llspatialpartition.cpp.
References c, genBoxList(), glCallList, glPopMatrix, glTranslatef, r, and sBoxList.
Referenced by renderOctree(), and renderTexturePriority().
Definition at line 1474 of file llspatialpartition.cpp.
References glBegin, glEnd, size, v1, and v2.
Referenced by renderBoundingBox(), and renderOctree().
BOOL earlyFail | ( | LLCamera * | camera, | |
LLSpatialGroup * | group | |||
) |
Definition at line 1642 of file llspatialpartition.cpp.
References LLCamera::AABBInFrustum(), c, e, f, FALSE, LLCoordFrame::getOrigin(), j, LLSpatialGroup::mBounds, LLVector3::mV, r, SG_OCCLUSION_FUDGE, and TRUE.
Referenced by LLSpatialPartition::checkOcclusion(), LLSpatialPartition::doOcclusion(), and LLSpatialPartition::processOcclusion().
void genBoxList | ( | ) |
Definition at line 1412 of file llspatialpartition.cpp.
References c, glBegin, glEnd, glGenLists, glNewList, r, and sBoxList.
Referenced by drawBox(), and LLSpatialPartition::restoreGL().
BOOL LLLineSegmentAABB | ( | const LLVector3 & | start, | |
const LLVector3 & | end, | |||
const LLVector3 & | center, | |||
const LLVector3 & | size | |||
) |
Definition at line 95 of file llspatialpartition.cpp.
References end, f, i, LLVector3::mV, size, and start.
Referenced by LLOctreePick::check(), and LLVOVolume::lineSegmentIntersect().
S32 LLSphereAABB | ( | const LLVector3 & | center, | |
const LLVector3 & | size, | |||
const LLVector3 & | pos, | |||
const F32 & | rad | |||
) |
Definition at line 122 of file llspatialpartition.cpp.
References i, LLVector3::mV, S32, and size.
Referenced by LLOctreeGet::traverse().
void pushVerts | ( | LLSpatialGroup * | group, | |
U32 | mask | |||
) |
Definition at line 2328 of file llspatialpartition.cpp.
References i, j, LLSpatialGroup::mDrawMap, NULL, params, and pushVerts().
void pushVerts | ( | LLDrawInfo * | params, | |
U32 | mask | |||
) |
Definition at line 2320 of file llspatialpartition.cpp.
References glDrawRangeElements, and params.
Referenced by pushVerts(), renderTextureAnim(), and renderVisibility().
void pushVertsColorCoded | ( | LLSpatialGroup * | group, | |
U32 | mask | |||
) |
Definition at line 2342 of file llspatialpartition.cpp.
References f, glColor4f, glDrawRangeElements, LLColor4::green, LLColor4::green1, LLColor4::green2, LLColor4::green3, LLColor4::green4, LLColor4::green5, LLColor4::green6, i, j, LLSpatialGroup::mDrawMap, NULL, and params.
Referenced by renderVisibility().
void renderBoundingBox | ( | LLDrawable * | drawable | ) |
Definition at line 2487 of file llspatialpartition.cpp.
References drawBoxOutline(), f, LLDrawable::getFace(), LLDrawable::getNumFaces(), LLDrawable::getSpatialExtents(), LLDrawable::getVObj(), LLDrawable::getVOVolume(), glColor4f, i, LLDrawable::isRoot(), LLDrawable::isSpatialBridge(), LL_PCODE_LEGACY_TREE, LLViewerObject::LL_VO_CLOUDS, LLViewerObject::LL_VO_PART_GROUP, LLViewerObject::LL_VO_SURFACE_PATCH, LLViewerObject::LL_VO_WATER, S32, and size.
Referenced by LLOctreeRenderNonOccluded::visit().
void renderOctree | ( | LLSpatialGroup * | group | ) |
Definition at line 2375 of file llspatialpartition.cpp.
References depth, drawBox(), drawBoxOutline(), f, face, FALSE, LLSpatialGroup::getData(), gFrameIntervalSeconds, gFrameTimeSeconds, glBlendFunc, glColor4f, glColor4fv, glDrawElements, glPolygonMode, i, j, LLVertexBuffer::MAP_VERTEX, LLSpatialGroup::mBounds, LLSpatialGroup::mBufferUsage, LLSpatialGroup::mBuilt, LLSpatialGroup::mObjectBounds, LLSpatialGroup::mOctreeNode, LLSpatialPartition::mRenderByGroup, LLSpatialGroup::mSpatialPartition, LLVector4::mV, S32, and LLVector4::setVec().
Referenced by LLOctreeRenderNonOccluded::traverse().
void renderPoints | ( | LLDrawable * | drawablep | ) |
Definition at line 2617 of file llspatialpartition.cpp.
References depth, LLDrawable::getFace(), LLDrawable::getNumFaces(), LLDrawable::getPositionGroup(), glBegin, glEnd, i, LLFace::mCenterLocal, LLVector3::mV, and S32.
Referenced by LLOctreeRenderNonOccluded::visit().
void renderTextureAnim | ( | LLDrawInfo * | params | ) |
Definition at line 2630 of file llspatialpartition.cpp.
References f, glColor4f, LLVertexBuffer::MAP_VERTEX, params, and pushVerts().
Referenced by LLOctreeRenderNonOccluded::visit().
void renderTexturePriority | ( | LLDrawable * | drawable | ) |
Definition at line 2560 of file llspatialpartition.cpp.
References drawBox(), f, face, LLDrawable::getFace(), LLDrawable::getNumFaces(), glColor4fv, lerp(), LLVector4::mV, sCurMaxTexPriority, size, sLastMaxTexPriority, and t.
Referenced by LLOctreeRenderNonOccluded::visit().
void renderVisibility | ( | LLSpatialGroup * | group | ) |
Definition at line 2465 of file llspatialpartition.cpp.
References f, glBlendFunc, glColor4f, glPolygonMode, LLVertexBuffer::MAP_VERTEX, pushVerts(), and pushVertsColorCoded().
Referenced by LLOctreeRenderNonOccluded::traverse().
Definition at line 67 of file llspatialpartition.cpp.
References llendl, and llerrs.
Referenced by LLSpatialPartition::doOcclusion(), LLSpatialGroup::LLSpatialGroup(), LLSpatialPartition::processOcclusion(), and LLSpatialGroup::validate().
void validate_draw_info | ( | LLDrawInfo & | params | ) |
Definition at line 270 of file llspatialpartition.cpp.
References i, llendl, llerrs, and params.
Referenced by LLVolumeGeometryManager::registerFace(), and LLSpatialGroup::validateDrawMap().
void validate_occlusion_list | ( | std::vector< LLPointer< LLSpatialGroup > > & | occluded_list | ) |
Definition at line 1736 of file llspatialpartition.cpp.
References LLTreeNode< T >::getListener(), LLOctreeNode< T >::getOctParent(), i, LLSpatialGroup::isState(), j, llendl, llerrs, and LLSpatialGroup::OCCLUDED.
Referenced by LLSpatialPartition::processOcclusion().
GLuint sBoxList = 0 [static] |
Definition at line 47 of file llspatialpartition.cpp.
Referenced by drawBox(), genBoxList(), and LLSpatialPartition::restoreGL().
F32 sCurMaxTexPriority = 1.f [static] |
Definition at line 63 of file llspatialpartition.cpp.
Referenced by LLSpatialPartition::renderDebug(), and renderTexturePriority().
const F32 SG_OCCLUSION_FUDGE = 1.01f |
Definition at line 49 of file llspatialpartition.cpp.
Referenced by LLSpatialPartition::buildOcclusion(), and earlyFail().
F32 sLastMaxTexPriority = 1.f [static] |
Definition at line 62 of file llspatialpartition.cpp.
Referenced by LLSpatialPartition::renderDebug(), and renderTexturePriority().
U32 sZombieGroups = 0 [static] |
Definition at line 60 of file llspatialpartition.cpp.
Referenced by LLSpatialGroup::handleDestruction(), and LLSpatialGroup::~LLSpatialGroup().