#include <llsurface.h>
Collaboration diagram for LLSurface:
Definition at line 72 of file llsurface.h.
LLSurface::LLSurface | ( | U32 | type, | |
LLViewerRegion * | regionp = NULL | |||
) |
Definition at line 74 of file llsurface.cpp.
References FALSE, i, mHasZData, mMaxZ, mMinZ, mNeighbors, mNorm, mPatchList, mSurfacePatchUpdateCount, mSurfaceZ, mVisiblePatchCount, mWaterObjp, NULL, and S32.
LLSurface::~LLSurface | ( | ) | [virtual] |
Definition at line 114 of file llsurface.cpp.
References LLViewerImageList::deleteImage(), destroyPatchData(), LLPipeline::findPool(), gImageList, gPipeline, llendl, llerrs, llwarns, mGridsPerEdge, mGridsPerPatchEdge, mNorm, mNumberOfPatches, mPatchesPerEdge, LLFacePool::mReferences, mSTexturep, mSurfaceZ, mWaterTexturep, NULL, LLDrawPool::POOL_TERRAIN, and LLPipeline::removePool().
Definition at line 342 of file llsurface.cpp.
References LLSurfacePatch::connectNeighbor(), LLSurfacePatch::dirtyZ(), EAST, gDirOpposite, getPatch(), gNoRender, i, mNeighbors, mPatchesPerEdge, NORTH, NORTHEAST, NORTHWEST, S32, SOUTH, SOUTHEAST, SOUTHWEST, LLSurfacePatch::updateEastEdge(), LLSurfacePatch::updateNorthEdge(), and WEST.
Referenced by LLViewerRegion::connectNeighbor().
Definition at line 815 of file llsurface.cpp.
References FALSE, mMetersPerEdge, LLVector3::mV, TRUE, VX, and VY.
void LLSurface::create | ( | const S32 | surface_grid_width, | |
const S32 | surface_patch_width, | |||
const LLVector3d & | origin_global, | |||
const F32 | width | |||
) |
Definition at line 164 of file llsurface.cpp.
References LLPatchVertexArray::create(), createPatchData(), f, gWorldPointer, i, initTextures(), mGridsPerEdge, mGridsPerPatchEdge, mMetersPerEdge, mMetersPerGrid, mNorm, mNumberOfPatches, mOOGridsPerEdge, mOriginGlobal, mPatchesPerEdge, mPVArray, mSurfaceZ, mVisiblePatchCount, S32, LLVector3::setVec(), and LLVector3d::setVec().
Referenced by LLViewerRegion::LLViewerRegion().
void LLSurface::createPatchData | ( | ) | [protected] |
Definition at line 1057 of file llsurface.cpp.
References EAST, FALSE, getPatch(), i, j, LLVector3d::mdV, mGridsPerEdge, mGridsPerPatchEdge, LLSurfacePatch::mHasReceivedData, mMetersPerGrid, mNorm, mNumberOfPatches, mOriginGlobal, mPatchesPerEdge, mPatchList, LLSurfacePatch::mSTexUpdate, mSurfaceZ, mVisiblePatchCount, NORTH, NORTHEAST, NORTHWEST, NULL, S32, LLSurfacePatch::setDataNorm(), LLSurfacePatch::setDataZ(), LLSurfacePatch::setNeighborPatch(), LLSurfacePatch::setOriginGlobal(), LLSurfacePatch::setSurface(), SOUTH, SOUTHEAST, SOUTHWEST, TRUE, and WEST.
Referenced by create().
void LLSurface::createSTexture | ( | ) | [protected] |
Definition at line 233 of file llsurface.cpp.
References LLViewerImageList::addImage(), FALSE, gImageList, i, j, mSTexturep, S32, sTextureSize, and TRUE.
Referenced by getSTexture(), and initTextures().
void LLSurface::createWaterTexture | ( | ) | [protected] |
Definition at line 258 of file llsurface.cpp.
References LLViewerImageList::addImage(), FALSE, gImageList, i, j, MAX_WATER_COLOR, LLColor4U::mV, mWaterTexturep, S32, sTextureSize, and TRUE.
Referenced by getWaterTexture(), and initTextures().
void LLSurface::decompressDCTPatch | ( | LLBitPack & | bitpack, | |
LLGroupHeader * | gopp, | |||
BOOL | b_large_patch | |||
) | [virtual] |
Definition at line 745 of file llsurface.cpp.
References bad_network_handler(), LLPatchHeader::dc_offset, decode_patch(), decode_patch_header(), decompress_patch(), LLSurfacePatch::dirtyZ(), END_OF_PATCHES, LLSurfacePatch::getDataZ(), LLSurfacePatch::getNeighborPatch(), i, init_patch_decompressor(), j, LARGE_PATCH_SIZE, llendl, llwarns, mGridsPerEdge, mPatchesPerEdge, mPatchList, LLGroupHeader::patch_size, LLPatchHeader::patchids, LLPatchHeader::quant_wbits, LLPatchHeader::range, S32, set_group_of_patch_header(), LLSurfacePatch::setHasReceivedData(), SOUTH, SOUTHWEST, LLGroupHeader::stride, LLSurfacePatch::updateEastEdge(), LLSurfacePatch::updateNorthEdge(), and WEST.
void LLSurface::destroyPatchData | ( | ) | [protected] |
Definition at line 1178 of file llsurface.cpp.
References mPatchList, mVisiblePatchCount, and NULL.
Referenced by ~LLSurface().
void LLSurface::dirtyAllPatches | ( | ) |
Definition at line 1223 of file llsurface.cpp.
References i, mNumberOfPatches, mPatchList, and S32.
Referenced by LLViewerRegion::unpackRegionHandshake().
void LLSurface::dirtySurfacePatch | ( | LLSurfacePatch * | patchp | ) |
Definition at line 1232 of file llsurface.cpp.
References mDirtyPatchList.
Referenced by LLSurfacePatch::dirty(), and LLSurfacePatch::updateNormals().
void LLSurface::disconnectAllNeighbors | ( | ) |
Definition at line 552 of file llsurface.cpp.
References disconnectNeighbor(), i, mNeighbors, NULL, and S32.
Referenced by LLViewerRegion::disconnectAllNeighbors().
Definition at line 533 of file llsurface.cpp.
References i, mNeighbors, mNumberOfPatches, mPatchList, NULL, and S32.
Referenced by disconnectAllNeighbors().
BOOL LLSurface::generateWaterTexture | ( | const F32 | x, | |
const F32 | y, | |||
const F32 | width, | |||
const F32 | height | |||
) | [protected] |
Definition at line 1267 of file llsurface.cpp.
References ABOVE_WATERLINE_ALPHA, FALSE, from_region_handle(), getMetersPerGrid(), getRegion(), getWaterHeight(), getWaterTexture(), i, j, llmax(), llmin(), llround(), MAX_WATER_COLOR, LLColor4U::mV, LLVector3::mV, mWaterTexturep, resolveHeightRegion(), S32, TRUE, VX, and VY.
Referenced by LLSurfacePatch::updateTexture().
S32 LLSurface::getGridsPerEdge | ( | ) | const |
Definition at line 582 of file llsurface.cpp.
References mGridsPerEdge.
Referenced by LLSurfacePatch::calcNormal(), LLSurfacePatch::eval(), LLSurfacePatch::getNormal(), LLSurfacePatch::getPointAgent(), LLSurfacePatch::getTexCoords(), LLSurfacePatch::updateEastEdge(), LLSurfacePatch::updateNormals(), LLSurfacePatch::updateNorthEdge(), and LLSurfacePatch::updateVerticalStats().
S32 LLSurface::getGridsPerPatchEdge | ( | ) | const |
Definition at line 592 of file llsurface.cpp.
References mGridsPerPatchEdge.
Referenced by LLVOSurfacePatch::dirtyPatch(), LLVOSurfacePatch::getGeomSizesEast(), LLVOSurfacePatch::getGeomSizesMain(), LLVOSurfacePatch::getGeomSizesNorth(), LLSurfacePatch::setOriginGlobal(), LLSurfacePatch::updateCompositionStats(), LLSurfacePatch::updateEastEdge(), LLVOSurfacePatch::updateEastGeometry(), LLVOSurfacePatch::updateGeometry(), LLVOSurfacePatch::updateMainGeometry(), LLSurfacePatch::updateNormals(), LLSurfacePatch::updateNorthEdge(), LLVOSurfacePatch::updateNorthGeometry(), LLSurfacePatch::updateTexture(), LLSurfacePatch::updateVerticalStats(), and LLSurfacePatch::updateVisibility().
F32 LLSurface::getMaxZ | ( | ) | const [inline] |
Definition at line 132 of file llsurface.h.
References mMaxZ.
Referenced by LLViewerRegion::calculateCenterGlobal(), and LLWorld::updateVisibilities().
F32 LLSurface::getMetersPerGrid | ( | ) | const |
Definition at line 577 of file llsurface.cpp.
References mMetersPerGrid.
Referenced by LLSurfacePatch::calcNormal(), LLVOSurfacePatch::dirtyPatch(), LLSurfacePatch::eval(), generateWaterTexture(), LLSurfacePatch::getPointAgent(), LLSurfacePatch::getTexCoords(), LLViewerWindow::mousePointOnLandGlobal(), LLSurfacePatch::setOriginGlobal(), LLSurfacePatch::updateCompositionStats(), LLSurfacePatch::updateTexture(), LLSurfacePatch::updateVerticalStats(), and LLSurfacePatch::updateVisibility().
F32 LLSurface::getMinZ | ( | ) | const [inline] |
Definition at line 131 of file llsurface.h.
References mMinZ.
Referenced by LLViewerRegion::calculateCenterGlobal(), and LLWorld::updateVisibilities().
LLVector3 LLSurface::getOriginAgent | ( | ) | const |
Definition at line 572 of file llsurface.cpp.
References gAgent, LLAgent::getPosAgentFromGlobal(), and mOriginGlobal.
Referenced by LLSurfacePatch::eval(), LLSurfacePatch::getTexCoords(), renderSurfaceBounds(), LLSurfacePatch::updateCompositionStats(), and LLSurfacePatch::updateVisibility().
const LLVector3d & LLSurface::getOriginGlobal | ( | ) | const |
Definition at line 567 of file llsurface.cpp.
References mOriginGlobal.
Referenced by LLSurfacePatch::setOriginGlobal(), and LLSurfacePatch::updateTexture().
LLSurfacePatch * LLSurface::getPatch | ( | const S32 | x, | |
const S32 | y | |||
) | const [protected] |
Definition at line 1206 of file llsurface.cpp.
References llendl, llerrs, mPatchesPerEdge, mPatchList, and NULL.
Referenced by connectNeighbor(), createPatchData(), and setOriginGlobal().
S32 LLSurface::getPatchesPerEdge | ( | ) | const |
LLViewerRegion* LLSurface::getRegion | ( | ) | const [inline] |
Definition at line 129 of file llsurface.h.
References mRegionp.
Referenced by LLSurfacePatch::eval(), LLVLComposition::generateHeights(), generateWaterTexture(), idleUpdate(), LLDrawPoolTerrain::renderOwnership(), LLSurfacePatch::setSurface(), LLSurfacePatch::updateCompositionStats(), LLSurfacePatch::updateTexture(), and LLSurfacePatch::updateVerticalStats().
Definition at line 1194 of file llsurface.cpp.
References mPVArray, and LLPatchVertexArray::mRenderLevelp.
Referenced by LLSurfacePatch::updateVisibility().
Definition at line 1200 of file llsurface.cpp.
References mPVArray, and LLPatchVertexArray::mRenderStridep.
Referenced by LLSurfacePatch::updateVisibility().
LLViewerImage * LLSurface::getSTexture | ( | ) |
Definition at line 215 of file llsurface.cpp.
References createSTexture(), mSTexturep, and LLPointer< Type >::notNull().
Referenced by LLVLComposition::generateTexture(), and LLVOSurfacePatch::getPool().
F32 LLSurface::getWaterHeight | ( | ) | const |
Definition at line 1253 of file llsurface.cpp.
References DEFAULT_WATER_HEIGHT, LLPointer< Type >::isNull(), mWaterObjp, and VZ.
Referenced by generateWaterTexture(), and LLViewerRegion::getWaterHeight().
LLVOWater* LLSurface::getWaterObj | ( | ) | [inline] |
LLViewerImage * LLSurface::getWaterTexture | ( | ) |
Definition at line 224 of file llsurface.cpp.
References createWaterTexture(), mWaterTexturep, and LLPointer< Type >::notNull().
Referenced by LLVOWater::createDrawable(), and generateWaterTexture().
Definition at line 96 of file llsurface.h.
References mSurfaceZ.
Referenced by LLToolBrushLand::handleMouseDown(), LLToolBrushLand::modifyLandInSelectionGlobal(), LLToolBrushLand::renderOverlay(), and resolveHeightRegion().
BOOL LLSurface::hasZData | ( | ) | const [inline] |
Definition at line 139 of file llsurface.h.
References mHasZData.
Referenced by LLWorld::updateVisibilities().
Definition at line 627 of file llsurface.cpp.
References LLSurfacePatch::clearDirty(), LLViewerRegion::dirtyHeights(), f, FALSE, LLTimer::getElapsedTimeF32(), getRegion(), gPipeline, LLPipeline::hasRenderType(), mDirtyPatchList, LLPipeline::RENDER_TYPE_TERRAIN, TRUE, LLSurfacePatch::updateNormals(), LLSurfacePatch::updateTexture(), and LLSurfacePatch::updateVerticalStats().
Referenced by LLViewerRegion::forceUpdate(), and LLViewerRegion::idleUpdate().
void LLSurface::initClasses | ( | ) | [static] |
void LLSurface::initTextures | ( | ) | [protected] |
Definition at line 283 of file llsurface.cpp.
References LLPipeline::addObject(), LLViewerObjectList::createObjectViewer(), createSTexture(), createWaterTexture(), DEFAULT_WATER_HEIGHT, from_region_handle(), LLControlGroup::getBOOL(), LLViewerRegion::getHandle(), gObjectList, gPipeline, gSavedSettings, LLViewerObject::LL_VO_WATER, mRegionp, and mWaterObjp.
Referenced by create().
void LLSurface::initWater | ( | ) | [protected] |
void LLSurface::renderSurfaceBounds | ( | ) |
Definition at line 669 of file llsurface.cpp.
References getOriginAgent(), glBegin, glEnd, glPopMatrix, glTranslatef, gWorldPointer, height, LLVector3::mV, VX, and VY.
F32 LLSurface::resolveHeightGlobal | ( | const LLVector3d & | position_global | ) | const |
Definition at line 887 of file llsurface.cpp.
References LLViewerRegion::getPosRegionFromGlobal(), mRegionp, resolveHeightRegion(), and v.
Referenced by LLViewerParcelOverlay::renderPropertyLines(), LLWorld::resolveLandHeightGlobal(), and LLWorld::resolveStepHeightGlobal().
Definition at line 111 of file llsurface.h.
References LLVector3::mV, resolveHeightRegion(), VX, and VY.
Definition at line 826 of file llsurface.cpp.
References bottom, f, getZ(), height, left, llfloor(), mGridsPerEdge, mMetersPerEdge, mMetersPerGrid, right, S32, and top.
Referenced by LLViewerParcelOverlay::addPropertyLine(), LLVLComposition::generateHeights(), generateWaterTexture(), LLVOGrass::getGeometry(), LLViewerRegion::getLandHeightRegion(), LLViewerWindow::mousePointOnLandGlobal(), LLViewerParcelMgr::renderOneSegment(), resolveHeightGlobal(), and resolveHeightRegion().
LLVector3 LLSurface::resolveNormalGlobal | ( | const LLVector3d & | v | ) | const |
Definition at line 900 of file llsurface.cpp.
References i, j, LLVector3d::mdV, mGridsPerEdge, mMetersPerEdge, mMetersPerGrid, mOriginGlobal, mSurfaceZ, LLVector3::normVec(), LLVector3::setVec(), VX, VY, and LLVector3::z_axis.
Referenced by LLWorld::resolveLandNormalGlobal().
LLSurfacePatch * LLSurface::resolvePatchGlobal | ( | const LLVector3d & | position_global | ) | const |
Definition at line 1034 of file llsurface.cpp.
References LLViewerRegion::getPosRegionFromGlobal(), mRegionp, and resolvePatchRegion().
Referenced by LLWorld::resolveLandPatchGlobal().
LLSurfacePatch * LLSurface::resolvePatchRegion | ( | const LLVector3 & | position_region | ) | const |
Definition at line 1028 of file llsurface.cpp.
References LLVector3::mV, resolvePatchRegion(), VX, and VY.
LLSurfacePatch * LLSurface::resolvePatchRegion | ( | const F32 | x, | |
const F32 | y | |||
) | const |
Definition at line 960 of file llsurface.cpp.
References f, i, j, llclamp(), llendl, llwarns, mGridsPerPatchEdge, mMetersPerEdge, mMetersPerGrid, mNumberOfPatches, mPatchesPerEdge, mPatchList, NULL, and S32.
Referenced by LLVOGrass::getGeometry(), LLToolBrushLand::modifyLandAtPointGlobal(), LLToolBrushLand::modifyLandInSelectionGlobal(), resolvePatchGlobal(), and resolvePatchRegion().
void LLSurface::setOriginGlobal | ( | const LLVector3d & | origin_global | ) |
Definition at line 307 of file llsurface.cpp.
References LLSurfacePatch::getOriginGlobal(), getPatch(), i, j, LLVector3d::mdV, mGridsPerPatchEdge, mMetersPerGrid, mOriginGlobal, mPatchesPerEdge, mWaterObjp, LLPointer< Type >::notNull(), S32, LLSurfacePatch::setOriginGlobal(), VX, VY, VZ, x, y, and z.
Referenced by LLViewerRegion::setOriginGlobal().
void LLSurface::setRegion | ( | LLViewerRegion * | regionp | ) |
Definition at line 157 of file llsurface.cpp.
References mRegionp.
Referenced by LLViewerRegion::LLViewerRegion().
Definition at line 1188 of file llsurface.cpp.
References sTextureSize.
Referenced by saved_settings_to_globals().
Definition at line 1239 of file llsurface.cpp.
References LLPointer< Type >::isNull(), llendl, llwarns, mWaterObjp, and VZ.
Referenced by LLViewerRegion::setWaterHeight().
Definition at line 607 of file llsurface.cpp.
References gAgent, LLAgent::getCameraPositionGlobal(), LLViewerRegion::getPosRegionFromGlobal(), LLSurfacePatch::getVisible(), i, mNumberOfPatches, mPatchList, mRegionp, mVisiblePatchCount, S32, LLSurfacePatch::updateCameraDistanceRegion(), and LLSurfacePatch::updateVisibility().
Referenced by LLWorld::updateVisibilities().
friend class LLSurfacePatch [friend] |
Definition at line 148 of file llsurface.h.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLSurface & | S | |||
) | [friend] |
Definition at line 1041 of file llsurface.cpp.
F32 LLSurface::mDetailTexScale [protected] |
Definition at line 223 of file llsurface.h.
Definition at line 173 of file llsurface.h.
std::set<LLSurfacePatch *> LLSurface::mDirtyPatchList [protected] |
Definition at line 153 of file llsurface.h.
Referenced by create(), createPatchData(), decompressDCTPatch(), getGridsPerEdge(), getZ(), LLToolBrushLand::handleMouseDown(), LLToolBrushLand::modifyLandInSelectionGlobal(), LLViewerWindow::mousePointOnLandGlobal(), moveZ(), operator<<(), LLToolBrushLand::renderOverlay(), resolveHeightRegion(), resolveNormalGlobal(), and ~LLSurface().
U32 LLSurface::mGridsPerPatchEdge [protected] |
Definition at line 218 of file llsurface.h.
Referenced by create(), createPatchData(), getGridsPerPatchEdge(), operator<<(), resolvePatchRegion(), setOriginGlobal(), and ~LLSurface().
BOOL LLSurface::mHasZData [protected] |
Definition at line 227 of file llsurface.h.
Referenced by hasZData(), LLSurface(), and LLSurfacePatch::updateVerticalStats().
F32 LLSurface::mMaxZ [protected] |
Definition at line 229 of file llsurface.h.
Referenced by getMaxZ(), LLSurface(), and LLSurfacePatch::updateVerticalStats().
F32 LLSurface::mMetersPerEdge [protected] |
Definition at line 220 of file llsurface.h.
Referenced by containsPosition(), create(), resolveHeightRegion(), resolveNormalGlobal(), and resolvePatchRegion().
F32 LLSurface::mMetersPerGrid [protected] |
Definition at line 219 of file llsurface.h.
Referenced by create(), createPatchData(), getMetersPerGrid(), operator<<(), resolveHeightRegion(), resolveNormalGlobal(), resolvePatchRegion(), and setOriginGlobal().
F32 LLSurface::mMinZ [protected] |
Definition at line 228 of file llsurface.h.
Referenced by getMinZ(), LLSurface(), and LLSurfacePatch::updateVerticalStats().
Definition at line 169 of file llsurface.h.
Referenced by connectNeighbor(), disconnectAllNeighbors(), disconnectNeighbor(), and LLSurface().
LLVector3* LLSurface::mNorm [protected] |
Definition at line 204 of file llsurface.h.
Referenced by create(), createPatchData(), LLSurface(), and ~LLSurface().
Definition at line 158 of file llsurface.h.
Referenced by create(), createPatchData(), dirtyAllPatches(), disconnectNeighbor(), resolvePatchRegion(), updatePatchVisibilities(), and ~LLSurface().
LLVector3d LLSurface::mOriginGlobal [protected] |
Definition at line 197 of file llsurface.h.
Referenced by create(), createPatchData(), getOriginAgent(), getOriginGlobal(), operator<<(), resolveNormalGlobal(), and setOriginGlobal().
Definition at line 157 of file llsurface.h.
Referenced by connectNeighbor(), create(), createPatchData(), decompressDCTPatch(), getPatch(), getPatchesPerEdge(), operator<<(), resolvePatchRegion(), setOriginGlobal(), and ~LLSurface().
LLSurfacePatch* LLSurface::mPatchList [protected] |
Definition at line 198 of file llsurface.h.
Referenced by createPatchData(), decompressDCTPatch(), destroyPatchData(), dirtyAllPatches(), disconnectNeighbor(), getPatch(), LLSurface(), resolvePatchRegion(), and updatePatchVisibilities().
LLPatchVertexArray LLSurface::mPVArray [protected] |
Definition at line 225 of file llsurface.h.
Referenced by LLSurfacePatch::calcNormal(), create(), getRenderLevel(), and getRenderStride().
LLViewerRegion* LLSurface::mRegionp [private] |
Definition at line 234 of file llsurface.h.
Referenced by getRegion(), initTextures(), resolveHeightGlobal(), resolvePatchGlobal(), setRegion(), and updatePatchVisibilities().
LLPointer<LLViewerImage> LLSurface::mSTexturep [protected] |
Definition at line 210 of file llsurface.h.
Referenced by createSTexture(), getSTexture(), and ~LLSurface().
S32 LLSurface::mSurfacePatchUpdateCount [protected] |
F32 LLSurface::mSurfaceTexScale [protected] |
Definition at line 222 of file llsurface.h.
F32* LLSurface::mSurfaceZ [protected] |
Definition at line 201 of file llsurface.h.
Referenced by create(), createPatchData(), getZ(), LLSurface(), moveZ(), resolveNormalGlobal(), and ~LLSurface().
Definition at line 171 of file llsurface.h.
Referenced by LLSurfacePatch::setSurface(), and LLSurfacePatch::updateNormals().
S32 LLSurface::mVisiblePatchCount [protected] |
Definition at line 216 of file llsurface.h.
Referenced by create(), createPatchData(), destroyPatchData(), LLSurface(), operator<<(), and updatePatchVisibilities().
LLPointer<LLVOWater> LLSurface::mWaterObjp [protected] |
Definition at line 213 of file llsurface.h.
Referenced by getWaterHeight(), getWaterObj(), initTextures(), LLSurface(), setOriginGlobal(), and setWaterHeight().
LLPointer<LLViewerImage> LLSurface::mWaterTexturep [protected] |
Definition at line 211 of file llsurface.h.
Referenced by createWaterTexture(), generateWaterTexture(), getWaterTexture(), and ~LLSurface().
S32 LLSurface::sTexelsUpdated = 0 [static] |
Definition at line 176 of file llsurface.h.
Referenced by LLVLComposition::generateTexture(), and reset_statistics().
S32 LLSurface::sTextureSize = 256 [static, private] |
Definition at line 235 of file llsurface.h.
Referenced by createSTexture(), createWaterTexture(), and setTextureSize().
F32 LLSurface::sTextureUpdateTime = 0.f [static] |
Definition at line 175 of file llsurface.h.
Referenced by LLVLComposition::generateTexture(), and reset_statistics().