#include <llsurfacepatch.h>
Collaboration diagram for LLSurfacePatch:
Definition at line 58 of file llsurfacepatch.h.
LLSurfacePatch::LLSurfacePatch | ( | ) |
Definition at line 54 of file llsurfacepatch.cpp.
References f, FALSE, i, mCenterRegion, mConnectedEdge, mDirty, mDirtyZStats, mHasReceivedData, mHeightsGenerated, mMaxComposition, mMaxZ, mMeanComposition, mMeanZ, mMinComposition, mMinZ, mNormalsInvalid, mOriginRegion, mRadius, NO_EDGE, NULL, S32, setNeighborPatch(), and TRUE.
LLSurfacePatch::~LLSurfacePatch | ( | ) |
Definition at line 246 of file llsurfacepatch.cpp.
References EAST, LLSurface::getGridsPerEdge(), LLSurface::getMetersPerGrid(), getNeighborPatch(), i, j, mDataNorm, mDataZ, LLPatchVertexArray::mPatchWidth, LLSurface::mPVArray, mSurfacep, LLVector3::normVec(), NORTH, S32, SOUTH, and WEST.
Referenced by updateNormals().
void LLSurfacePatch::clearDirty | ( | ) | [inline] |
void LLSurfacePatch::clearVObj | ( | ) |
void LLSurfacePatch::connectNeighbor | ( | LLSurfacePatch * | neighborp, | |
const U32 | direction | |||
) |
Definition at line 792 of file llsurfacepatch.cpp.
References EAST, EAST_EDGE, gDirOpposite, llassert, mConnectedEdge, mNormalsInvalid, NORTH, NORTH_EDGE, setNeighborPatch(), SOUTH, SOUTH_EDGE, TRUE, WEST, and WEST_EDGE.
Referenced by LLSurface::connectNeighbor().
void LLSurfacePatch::dirty | ( | ) |
Definition at line 95 of file llsurfacepatch.cpp.
References LLSurface::dirtySurfacePatch(), FALSE, llendl, llwarns, mDirty, mDirtyZStats, mHeightsGenerated, mSurfacep, mVObjp, and TRUE.
Referenced by dirtyZ().
void LLSurfacePatch::dirtyZ | ( | ) |
Definition at line 728 of file llsurfacepatch.cpp.
References dirty(), gDirAdjacent, gDirOpposite, getNeighborPatch(), gFrameTime, i, mLastUpdateTime, mNormalsInvalid, mSTexUpdate, and TRUE.
Referenced by LLSurface::connectNeighbor(), LLSurface::decompressDCTPatch(), LLToolBrushLand::modifyLandAtPointGlobal(), and LLToolBrushLand::modifyLandInSelectionGlobal().
Definition at line 133 of file llsurfacepatch.cpp.
References EAST, EAST_EDGE, getNeighborPatch(), i, mConnectedEdge, mNormalsInvalid, mSurfacep, NORTH, NORTH_EDGE, NULL, setNeighborPatch(), SOUTH, SOUTH_EDGE, TRUE, WEST, and WEST_EDGE.
void LLSurfacePatch::eval | ( | const U32 | x, | |
const U32 | y, | |||
const U32 | stride, | |||
LLVector3 * | vertex, | |||
LLVector3 * | normal, | |||
LLVector2 * | tex0, | |||
LLVector2 * | tex1 | |||
) |
Definition at line 206 of file llsurfacepatch.cpp.
References f, LLViewerRegion::getCompositionXY(), LLSurface::getGridsPerEdge(), LLSurface::getMetersPerGrid(), getNormal(), LLSurface::getOriginAgent(), getOriginAgent(), LLSurface::getRegion(), llclamp(), llfloor(), mDataZ, LLVector3d::mdV, mOriginGlobal, mOriginRegion, mSurfacep, LLVector2::mV, LLVector3::mV, noise2(), VX, VY, and VZ.
Referenced by LLVOSurfacePatch::updateEastGeometry(), LLVOSurfacePatch::updateMainGeometry(), and LLVOSurfacePatch::updateNorthGeometry().
const LLVector3 & LLSurfacePatch::getCenterRegion | ( | ) | const |
Definition at line 926 of file llsurfacepatch.cpp.
References mCenterRegion.
Referenced by LLVOSurfacePatch::dirtyPatch().
F32* LLSurfacePatch::getDataZ | ( | ) | const [inline] |
Definition at line 130 of file llsurfacepatch.h.
References mDataZ.
Referenced by LLSurface::decompressDCTPatch().
F32 LLSurfacePatch::getDistance | ( | ) | const |
Definition at line 372 of file llsurfacepatch.cpp.
References LLPatchVisibilityInfo::mDistance, and mVisInfo.
BOOL LLSurfacePatch::getHasReceivedData | ( | ) | const |
Definition at line 921 of file llsurfacepatch.cpp.
References mHasReceivedData.
Referenced by updateNormals(), and updateTexture().
const U64 & LLSurfacePatch::getLastUpdateTime | ( | ) | const |
Definition at line 759 of file llsurfacepatch.cpp.
References mLastUpdateTime.
Referenced by LLVOGrass::getGeometry(), and LLVOGrass::idleUpdate().
F32 LLSurfacePatch::getMaxComposition | ( | ) | const |
Definition at line 978 of file llsurfacepatch.cpp.
References mMaxComposition.
Referenced by LLVOSurfacePatch::createDrawable(), and LLVOSurfacePatch::updateGeometry().
F32 LLSurfacePatch::getMaxZ | ( | ) | const |
Definition at line 764 of file llsurfacepatch.cpp.
References mMaxZ.
Referenced by LLVOSurfacePatch::dirtyPatch().
F32 LLSurfacePatch::getMeanComposition | ( | ) | const |
F32 LLSurfacePatch::getMinComposition | ( | ) | const |
Definition at line 973 of file llsurfacepatch.cpp.
References mMinComposition.
Referenced by LLVOSurfacePatch::createDrawable(), and LLVOSurfacePatch::updateGeometry().
F32 LLSurfacePatch::getMinZ | ( | ) | const |
Definition at line 769 of file llsurfacepatch.cpp.
References mMinZ.
Referenced by LLVOSurfacePatch::dirtyPatch().
LLSurfacePatch * LLSurfacePatch::getNeighborPatch | ( | const U32 | direction | ) | const |
Definition at line 994 of file llsurfacepatch.cpp.
References mNeighborPatches.
Referenced by calcNormal(), LLSurface::decompressDCTPatch(), dirtyZ(), disconnectNeighbor(), updateEastEdge(), LLVOSurfacePatch::updateGeometry(), updateNormals(), updateNorthEdge(), updateTexture(), and updateVisibility().
Definition at line 358 of file llsurfacepatch.cpp.
References LLSurface::getGridsPerEdge(), mDataNorm, and mSurfacep.
Referenced by eval().
LLVector3 LLSurfacePatch::getOriginAgent | ( | ) | const |
Definition at line 896 of file llsurfacepatch.cpp.
References gAgent, LLAgent::getPosAgentFromGlobal(), and mOriginGlobal.
Referenced by eval(), getPointAgent(), getTexCoords(), and updateCompositionStats().
const LLVector3d & LLSurfacePatch::getOriginGlobal | ( | ) | const |
Definition at line 891 of file llsurfacepatch.cpp.
References mOriginGlobal.
Referenced by LLSurface::setOriginGlobal(), and updateTexture().
Definition at line 179 of file llsurfacepatch.cpp.
References LLSurface::getGridsPerEdge(), LLSurface::getMetersPerGrid(), getOriginAgent(), mDataZ, mSurfacep, LLVector3::mV, VX, VY, and VZ.
Referenced by LLVOSurfacePatch::updateEastGeometry(), LLVOSurfacePatch::updateMainGeometry(), and LLVOSurfacePatch::updateNorthGeometry().
S32 LLSurfacePatch::getRenderLevel | ( | ) | const |
Definition at line 911 of file llsurfacepatch.cpp.
References LLPatchVisibilityInfo::mRenderLevel, and mVisInfo.
U32 LLSurfacePatch::getRenderStride | ( | ) | const |
Definition at line 906 of file llsurfacepatch.cpp.
References LLPatchVisibilityInfo::mRenderStride, and mVisInfo.
Referenced by LLVOSurfacePatch::updateGeometry().
LLSurface* LLSurfacePatch::getSurface | ( | ) | const [inline] |
Definition at line 97 of file llsurfacepatch.h.
References mSurfacep.
Referenced by LLVOSurfacePatch::dirtyPatch(), LLVOSurfacePatch::getGeomSizesEast(), LLVOSurfacePatch::getGeomSizesMain(), LLVOSurfacePatch::getGeomSizesNorth(), LLVOSurfacePatch::getPool(), LLDrawPoolTerrain::renderOwnership(), LLVOSurfacePatch::updateEastGeometry(), LLVOSurfacePatch::updateGeometry(), LLVOSurfacePatch::updateMainGeometry(), LLVOSurfacePatch::updateNorthGeometry(), and updateTexture().
Definition at line 191 of file llsurfacepatch.cpp.
References LLSurface::getGridsPerEdge(), LLSurface::getMetersPerGrid(), LLSurface::getOriginAgent(), getOriginAgent(), mDataZ, mSurfacep, LLVector3::mV, VX, VY, and VZ.
BOOL LLSurfacePatch::getVisible | ( | ) | const |
Definition at line 901 of file llsurfacepatch.cpp.
References LLPatchVisibilityInfo::mbIsVisible, and mVisInfo.
Referenced by LLSurface::updatePatchVisibilities().
Definition at line 129 of file llsurfacepatch.h.
References mDataNorm.
Referenced by LLSurface::createPatchData().
Definition at line 128 of file llsurfacepatch.h.
References mDataZ.
Referenced by LLSurface::createPatchData().
void LLSurfacePatch::setHasReceivedData | ( | ) |
Definition at line 916 of file llsurfacepatch.cpp.
References mHasReceivedData, and TRUE.
Referenced by LLSurface::decompressDCTPatch().
void LLSurfacePatch::setNeighborPatch | ( | const U32 | direction, | |
LLSurfacePatch * | neighborp | |||
) |
Definition at line 983 of file llsurfacepatch.cpp.
References gDirAdjacent, mNeighborPatches, mNormalsInvalid, and TRUE.
Referenced by connectNeighbor(), LLSurface::createPatchData(), disconnectNeighbor(), and LLSurfacePatch().
void LLSurfacePatch::setOriginGlobal | ( | const LLVector3d & | origin_global | ) |
Definition at line 774 of file llsurfacepatch.cpp.
References FALSE, LLSurface::getGridsPerPatchEdge(), LLSurface::getMetersPerGrid(), LLSurface::getOriginGlobal(), LLPatchVisibilityInfo::mbIsVisible, mCenterRegion, LLPatchVisibilityInfo::mDistance, mOriginGlobal, mOriginRegion, LLPatchVisibilityInfo::mRenderLevel, LLPatchVisibilityInfo::mRenderStride, mSurfacep, LLVector3::mV, mVisInfo, LLVector3::setVec(), VX, and VY.
Referenced by LLSurface::createPatchData(), and LLSurface::setOriginGlobal().
Definition at line 119 of file llsurfacepatch.cpp.
References LLPipeline::addObject(), LLViewerObjectList::createObjectViewer(), LLSurface::getRegion(), gObjectList, gPipeline, LLViewerObject::LL_VO_SURFACE_PATCH, llassert, mCenterRegion, mSurfacep, LLSurface::mType, mVObjp, and NULL.
Referenced by LLSurface::createPatchData().
Definition at line 365 of file llsurfacepatch.cpp.
References f, llmax(), LLVector3::magVec(), mCenterRegion, LLPatchVisibilityInfo::mDistance, mRadius, and mVisInfo.
Referenced by LLSurface::updatePatchVisibilities().
void LLSurfacePatch::updateCompositionStats | ( | ) |
Definition at line 932 of file llsurfacepatch.cpp.
References count, LLViewerRegion::getComposition(), LLSurface::getGridsPerPatchEdge(), LLSurface::getMetersPerGrid(), LLSurface::getOriginAgent(), getOriginAgent(), LLSurface::getRegion(), LLViewerLayer::getValueScaled(), height, i, j, llmax(), llmin(), mMaxComposition, mMeanComposition, mMinComposition, mSurfacep, LLVector3::mV, VX, VY, width, x, and y.
Referenced by updateTexture().
void LLSurfacePatch::updateEastEdge | ( | ) |
Definition at line 604 of file llsurfacepatch.cpp.
References EAST, EAST_EDGE, LLSurface::getGridsPerEdge(), LLSurface::getGridsPerPatchEdge(), getNeighborPatch(), j, mConnectedEdge, mDataZ, and mSurfacep.
Referenced by LLSurface::connectNeighbor(), and LLSurface::decompressDCTPatch().
void LLSurfacePatch::updateNormals | ( | ) |
Definition at line 442 of file llsurfacepatch.cpp.
References calcNormal(), LLSurface::dirtySurfacePatch(), EAST, FALSE, LLSurface::getGridsPerEdge(), LLSurface::getGridsPerPatchEdge(), getHasReceivedData(), getNeighborPatch(), i, j, mDataZ, MIDDLE, mNormalsInvalid, mSurfacep, LLSurface::mType, NORTH, NORTHEAST, NORTHWEST, SOUTH, SOUTHEAST, SOUTHWEST, TRUE, and WEST.
Referenced by LLSurface::idleUpdate().
void LLSurfacePatch::updateNorthEdge | ( | ) |
Definition at line 637 of file llsurfacepatch.cpp.
References LLSurface::getGridsPerEdge(), LLSurface::getGridsPerPatchEdge(), getNeighborPatch(), i, mConnectedEdge, mDataZ, mSurfacep, NORTH, and NORTH_EDGE.
Referenced by LLSurface::connectNeighbor(), and LLSurface::decompressDCTPatch().
BOOL LLSurfacePatch::updateTexture | ( | ) |
Definition at line 668 of file llsurfacepatch.cpp.
References EAST, FALSE, LLVLComposition::generateComposition(), LLVLComposition::generateHeights(), LLVLComposition::generateTexture(), LLSurface::generateWaterTexture(), LLViewerRegion::getComposition(), LLSurface::getGridsPerPatchEdge(), getHasReceivedData(), LLSurface::getMetersPerGrid(), getNeighborPatch(), LLSurface::getOriginGlobal(), getOriginGlobal(), LLSurface::getRegion(), getSurface(), LLVector3d::mdV, mHeightsGenerated, mSTexUpdate, mSurfacep, mVObjp, NORTH, SOUTH, TRUE, updateCompositionStats(), VX, VY, and WEST.
Referenced by LLSurface::idleUpdate().
void LLSurfacePatch::updateVerticalStats | ( | ) |
Definition at line 380 of file llsurfacepatch.cpp.
References LLViewerRegion::calculateCenterGlobal(), FALSE, LLSurface::getGridsPerEdge(), LLSurface::getGridsPerPatchEdge(), LLSurface::getMetersPerGrid(), LLSurface::getRegion(), i, j, llmax(), llmin(), LLVector3::magVec(), mCenterRegion, mDataZ, mDirtyZStats, LLSurface::mHasZData, LLSurface::mMaxZ, mMaxZ, mMeanZ, LLSurface::mMinZ, mMinZ, mRadius, mSurfacep, LLVector3::mV, mVObjp, TRUE, VZ, and z.
Referenced by LLSurface::idleUpdate().
void LLSurfacePatch::updateVisibility | ( | ) |
Definition at line 823 of file llsurfacepatch.cpp.
References FALSE, gCamera, LLSurface::getGridsPerPatchEdge(), LLSurface::getMetersPerGrid(), getNeighborPatch(), LLSurface::getOriginAgent(), LLSurface::getRenderLevel(), LLSurface::getRenderStride(), LLPointer< Type >::isNull(), llmin(), lltrunc(), LLPatchVisibilityInfo::mbIsVisible, mCenterRegion, LLPatchVisibilityInfo::mDistance, mRadius, LLPatchVisibilityInfo::mRenderLevel, LLPatchVisibilityInfo::mRenderStride, mSurfacep, mVisInfo, mVObjp, SOUTH, LLCamera::sphereInFrustum(), TRUE, and WEST.
Referenced by LLSurface::updatePatchVisibilities().
LLVector3 LLSurfacePatch::mCenterRegion [protected] |
Definition at line 165 of file llsurfacepatch.h.
Referenced by getCenterRegion(), LLSurfacePatch(), setOriginGlobal(), setSurface(), updateCameraDistanceRegion(), updateVerticalStats(), and updateVisibility().
U8 LLSurfacePatch::mConnectedEdge [protected] |
Definition at line 173 of file llsurfacepatch.h.
Referenced by connectNeighbor(), disconnectNeighbor(), LLSurfacePatch(), updateEastEdge(), and updateNorthEdge().
LLVector3* LLSurfacePatch::mDataNorm [protected] |
Definition at line 151 of file llsurfacepatch.h.
Referenced by calcNormal(), getNormal(), and setDataNorm().
U32 LLSurfacePatch::mDataOffset [protected] |
Definition at line 149 of file llsurfacepatch.h.
F32* LLSurfacePatch::mDataZ [protected] |
Definition at line 150 of file llsurfacepatch.h.
Referenced by calcNormal(), eval(), getDataZ(), getPointAgent(), getTexCoords(), setDataZ(), updateEastEdge(), updateNormals(), updateNorthEdge(), and updateVerticalStats().
BOOL LLSurfacePatch::mDirty [protected] |
Definition at line 145 of file llsurfacepatch.h.
Referenced by clearDirty(), dirty(), and LLSurfacePatch().
BOOL LLSurfacePatch::mDirtyZStats [protected] |
Definition at line 146 of file llsurfacepatch.h.
Referenced by dirty(), LLSurfacePatch(), and updateVerticalStats().
Definition at line 138 of file llsurfacepatch.h.
Referenced by LLSurface::createPatchData(), getHasReceivedData(), LLSurfacePatch(), and setHasReceivedData().
BOOL LLSurfacePatch::mHeightsGenerated [protected] |
Definition at line 147 of file llsurfacepatch.h.
Referenced by dirty(), LLSurfacePatch(), and updateTexture().
U64 LLSurfacePatch::mLastUpdateTime [protected] |
F32 LLSurfacePatch::mMaxComposition [protected] |
Definition at line 170 of file llsurfacepatch.h.
Referenced by getMaxComposition(), LLSurfacePatch(), and updateCompositionStats().
F32 LLSurfacePatch::mMaxZ [protected] |
Definition at line 166 of file llsurfacepatch.h.
Referenced by getMaxZ(), LLSurfacePatch(), and updateVerticalStats().
F32 LLSurfacePatch::mMeanComposition [protected] |
Definition at line 171 of file llsurfacepatch.h.
Referenced by getMeanComposition(), LLSurfacePatch(), and updateCompositionStats().
F32 LLSurfacePatch::mMeanZ [protected] |
Definition at line 166 of file llsurfacepatch.h.
Referenced by LLSurfacePatch(), and updateVerticalStats().
F32 LLSurfacePatch::mMinComposition [protected] |
Definition at line 169 of file llsurfacepatch.h.
Referenced by getMinComposition(), LLSurfacePatch(), and updateCompositionStats().
F32 LLSurfacePatch::mMinZ [protected] |
Definition at line 166 of file llsurfacepatch.h.
Referenced by getMinZ(), LLSurfacePatch(), and updateVerticalStats().
LLSurfacePatch* LLSurfacePatch::mNeighborPatches[8] [protected] |
Definition at line 142 of file llsurfacepatch.h.
Referenced by getNeighborPatch(), and setNeighborPatch().
BOOL LLSurfacePatch::mNormalsInvalid[9] [protected] |
Definition at line 143 of file llsurfacepatch.h.
Referenced by connectNeighbor(), dirtyZ(), disconnectNeighbor(), LLSurfacePatch(), setNeighborPatch(), and updateNormals().
LLVector3d LLSurfacePatch::mOriginGlobal [protected] |
Definition at line 160 of file llsurfacepatch.h.
Referenced by eval(), getOriginAgent(), getOriginGlobal(), and setOriginGlobal().
LLVector3 LLSurfacePatch::mOriginRegion [protected] |
Definition at line 161 of file llsurfacepatch.h.
Referenced by eval(), LLSurfacePatch(), and setOriginGlobal().
F32 LLSurfacePatch::mRadius [protected] |
Definition at line 167 of file llsurfacepatch.h.
Referenced by LLSurfacePatch(), updateCameraDistanceRegion(), updateVerticalStats(), and updateVisibility().
Definition at line 139 of file llsurfacepatch.h.
Referenced by LLSurface::createPatchData(), dirtyZ(), and updateTexture().
LLSurface* LLSurfacePatch::mSurfacep [protected] |
Definition at line 177 of file llsurfacepatch.h.
Referenced by calcNormal(), dirty(), disconnectNeighbor(), eval(), getNormal(), getPointAgent(), getSurface(), getTexCoords(), setOriginGlobal(), setSurface(), updateCompositionStats(), updateEastEdge(), updateNormals(), updateNorthEdge(), updateTexture(), updateVerticalStats(), and updateVisibility().
LLPatchVisibilityInfo LLSurfacePatch::mVisInfo [protected] |
Definition at line 157 of file llsurfacepatch.h.
Referenced by getDistance(), getRenderLevel(), getRenderStride(), getVisible(), setOriginGlobal(), updateCameraDistanceRegion(), and updateVisibility().
LLPointer<LLVOSurfacePatch> LLSurfacePatch::mVObjp [protected] |
Definition at line 154 of file llsurfacepatch.h.
Referenced by clearVObj(), dirty(), setSurface(), updateTexture(), updateVerticalStats(), updateVisibility(), and ~LLSurfacePatch().