LLSurfacePatch Class Reference

#include <llsurfacepatch.h>

Collaboration diagram for LLSurfacePatch:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLSurfacePatch ()
 ~LLSurfacePatch ()
void reset (const U32 id)
void connectNeighbor (LLSurfacePatch *neighborp, const U32 direction)
void disconnectNeighbor (LLSurface *surfacep)
void setNeighborPatch (const U32 direction, LLSurfacePatch *neighborp)
LLSurfacePatchgetNeighborPatch (const U32 direction) const
void colorPatch (const U8 r, const U8 g, const U8 b)
BOOL updateTexture ()
void updateVerticalStats ()
void updateCompositionStats ()
void updateNormals ()
void updateEastEdge ()
void updateNorthEdge ()
void updateCameraDistanceRegion (const LLVector3 &pos_region)
void updateVisibility ()
void dirtyZ ()
void setHasReceivedData ()
BOOL getHasReceivedData () const
F32 getDistance () const
F32 getMaxZ () const
F32 getMinZ () const
F32 getMeanComposition () const
F32 getMinComposition () const
F32 getMaxComposition () const
const LLVector3getCenterRegion () const
const U64getLastUpdateTime () const
LLSurfacegetSurface () const
LLVector3 getPointAgent (const U32 x, const U32 y) const
LLVector2 getTexCoords (const U32 x, const U32 y) const
void calcNormal (const U32 x, const U32 y, const U32 stride)
const LLVector3getNormal (const U32 x, const U32 y) const
void eval (const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1)
LLVector3 getOriginAgent () const
const LLVector3dgetOriginGlobal () const
void setOriginGlobal (const LLVector3d &origin_global)
BOOL getVisible () const
U32 getRenderStride () const
S32 getRenderLevel () const
void setSurface (LLSurface *surfacep)
void setDataZ (F32 *data_z)
void setDataNorm (LLVector3 *data_norm)
F32getDataZ () const
void dirty ()
void clearDirty ()
void clearVObj ()

Public Attributes

BOOL mHasReceivedData
BOOL mSTexUpdate

Protected Attributes

LLSurfacePatchmNeighborPatches [8]
BOOL mNormalsInvalid [9]
BOOL mDirty
BOOL mDirtyZStats
BOOL mHeightsGenerated
U32 mDataOffset
F32mDataZ
LLVector3mDataNorm
LLPointer< LLVOSurfacePatchmVObjp
LLPatchVisibilityInfo mVisInfo
LLVector3d mOriginGlobal
LLVector3 mOriginRegion
LLVector3 mCenterRegion
F32 mMinZ
F32 mMaxZ
F32 mMeanZ
F32 mRadius
F32 mMinComposition
F32 mMaxComposition
F32 mMeanComposition
U8 mConnectedEdge
U64 mLastUpdateTime
LLSurfacemSurfacep


Detailed Description

Definition at line 58 of file llsurfacepatch.h.


Constructor & Destructor Documentation

LLSurfacePatch::LLSurfacePatch (  ) 

LLSurfacePatch::~LLSurfacePatch (  ) 

Definition at line 89 of file llsurfacepatch.cpp.

References mVObjp, and NULL.


Member Function Documentation

void LLSurfacePatch::reset ( const U32  id  ) 

void LLSurfacePatch::connectNeighbor ( LLSurfacePatch neighborp,
const U32  direction 
)

Definition at line 800 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::disconnectNeighbor ( LLSurface surfacep  ) 

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.

Here is the call graph for this function:

void LLSurfacePatch::setNeighborPatch ( const U32  direction,
LLSurfacePatch neighborp 
)

Definition at line 994 of file llsurfacepatch.cpp.

References gDirAdjacent, mNeighborPatches, mNormalsInvalid, and TRUE.

Referenced by connectNeighbor(), LLSurface::createPatchData(), disconnectNeighbor(), and LLSurfacePatch().

Here is the caller graph for this function:

LLSurfacePatch * LLSurfacePatch::getNeighborPatch ( const U32  direction  )  const

void LLSurfacePatch::colorPatch ( const U8  r,
const U8  g,
const U8  b 
)

BOOL LLSurfacePatch::updateTexture (  ) 

void LLSurfacePatch::updateVerticalStats (  ) 

void LLSurfacePatch::updateCompositionStats (  ) 

void LLSurfacePatch::updateNormals (  ) 

void LLSurfacePatch::updateEastEdge (  ) 

Definition at line 612 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::updateNorthEdge (  ) 

Definition at line 645 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::updateCameraDistanceRegion ( const LLVector3 pos_region  ) 

Definition at line 365 of file llsurfacepatch.cpp.

References llmax(), LLVector3::magVec(), mCenterRegion, LLPatchVisibilityInfo::mDistance, mRadius, mVisInfo, LLPipeline::sDynamicLOD, and LLVOSurfacePatch::sLODFactor.

Referenced by LLSurface::updatePatchVisibilities().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::updateVisibility (  ) 

void LLSurfacePatch::dirtyZ (  ) 

void LLSurfacePatch::setHasReceivedData (  ) 

Definition at line 927 of file llsurfacepatch.cpp.

References mHasReceivedData, and TRUE.

Referenced by LLSurface::decompressDCTPatch().

Here is the caller graph for this function:

BOOL LLSurfacePatch::getHasReceivedData (  )  const

Definition at line 932 of file llsurfacepatch.cpp.

References mHasReceivedData.

Referenced by updateNormals(), and updateTexture().

Here is the caller graph for this function:

F32 LLSurfacePatch::getDistance (  )  const

Definition at line 380 of file llsurfacepatch.cpp.

References LLPatchVisibilityInfo::mDistance, and mVisInfo.

F32 LLSurfacePatch::getMaxZ (  )  const

Definition at line 772 of file llsurfacepatch.cpp.

References mMaxZ.

Referenced by LLVOSurfacePatch::dirtyPatch().

Here is the caller graph for this function:

F32 LLSurfacePatch::getMinZ (  )  const

Definition at line 777 of file llsurfacepatch.cpp.

References mMinZ.

Referenced by LLVOSurfacePatch::dirtyPatch().

Here is the caller graph for this function:

F32 LLSurfacePatch::getMeanComposition (  )  const

Definition at line 979 of file llsurfacepatch.cpp.

References mMeanComposition.

F32 LLSurfacePatch::getMinComposition (  )  const

Definition at line 984 of file llsurfacepatch.cpp.

References mMinComposition.

Referenced by LLVOSurfacePatch::createDrawable(), and LLVOSurfacePatch::updateGeometry().

Here is the caller graph for this function:

F32 LLSurfacePatch::getMaxComposition (  )  const

Definition at line 989 of file llsurfacepatch.cpp.

References mMaxComposition.

Referenced by LLVOSurfacePatch::createDrawable(), and LLVOSurfacePatch::updateGeometry().

Here is the caller graph for this function:

const LLVector3 & LLSurfacePatch::getCenterRegion (  )  const

Definition at line 937 of file llsurfacepatch.cpp.

References mCenterRegion.

Referenced by LLVOSurfacePatch::dirtyPatch().

Here is the caller graph for this function:

const U64 & LLSurfacePatch::getLastUpdateTime (  )  const

Definition at line 767 of file llsurfacepatch.cpp.

References mLastUpdateTime.

Referenced by LLVOGrass::getGeometry(), and LLVOGrass::idleUpdate().

Here is the caller graph for this function:

LLSurface* LLSurfacePatch::getSurface (  )  const [inline]

LLVector3 LLSurfacePatch::getPointAgent ( const U32  x,
const U32  y 
) const

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().

Here is the call graph for this function:

Here is the caller graph for this function:

LLVector2 LLSurfacePatch::getTexCoords ( const U32  x,
const U32  y 
) const

Definition at line 191 of file llsurfacepatch.cpp.

References LLSurface::getGridsPerEdge(), LLSurface::getMetersPerGrid(), LLSurface::getOriginAgent(), getOriginAgent(), mDataZ, mSurfacep, LLVector3::mV, VX, VY, and VZ.

Here is the call graph for this function:

void LLSurfacePatch::calcNormal ( const U32  x,
const U32  y,
const U32  stride 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLVector3 & LLSurfacePatch::getNormal ( const U32  x,
const U32  y 
) const

Definition at line 358 of file llsurfacepatch.cpp.

References LLSurface::getGridsPerEdge(), mDataNorm, and mSurfacep.

Referenced by eval().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::eval ( const U32  x,
const U32  y,
const U32  stride,
LLVector3 vertex,
LLVector3 normal,
LLVector2 tex0,
LLVector2 tex1 
)

LLVector3 LLSurfacePatch::getOriginAgent (  )  const

Definition at line 907 of file llsurfacepatch.cpp.

References gAgent, LLAgent::getPosAgentFromGlobal(), and mOriginGlobal.

Referenced by eval(), getPointAgent(), getTexCoords(), and updateCompositionStats().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLVector3d & LLSurfacePatch::getOriginGlobal (  )  const

Definition at line 902 of file llsurfacepatch.cpp.

References mOriginGlobal.

Referenced by LLSurface::setOriginGlobal(), and updateTexture().

Here is the caller graph for this function:

void LLSurfacePatch::setOriginGlobal ( const LLVector3d origin_global  ) 

BOOL LLSurfacePatch::getVisible (  )  const

Definition at line 912 of file llsurfacepatch.cpp.

References LLPatchVisibilityInfo::mbIsVisible, and mVisInfo.

Referenced by LLSurface::updatePatchVisibilities().

Here is the caller graph for this function:

U32 LLSurfacePatch::getRenderStride (  )  const

Definition at line 917 of file llsurfacepatch.cpp.

References LLPatchVisibilityInfo::mRenderStride, and mVisInfo.

Referenced by LLVOSurfacePatch::updateGeometry().

Here is the caller graph for this function:

S32 LLSurfacePatch::getRenderLevel (  )  const

Definition at line 922 of file llsurfacepatch.cpp.

References LLPatchVisibilityInfo::mRenderLevel, and mVisInfo.

void LLSurfacePatch::setSurface ( LLSurface surfacep  ) 

Definition at line 119 of file llsurfacepatch.cpp.

References LLPipeline::addObject(), LLViewerObjectList::createObjectViewer(), LLSurface::getRegion(), gObjectList, LLViewerObject::LL_VO_SURFACE_PATCH, llassert, mCenterRegion, mSurfacep, LLSurface::mType, mVObjp, and NULL.

Referenced by LLSurface::createPatchData().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::setDataZ ( F32 data_z  )  [inline]

Definition at line 128 of file llsurfacepatch.h.

References mDataZ.

Referenced by LLSurface::createPatchData().

Here is the caller graph for this function:

void LLSurfacePatch::setDataNorm ( LLVector3 data_norm  )  [inline]

Definition at line 129 of file llsurfacepatch.h.

References mDataNorm.

Referenced by LLSurface::createPatchData().

Here is the caller graph for this function:

F32* LLSurfacePatch::getDataZ (  )  const [inline]

Definition at line 130 of file llsurfacepatch.h.

References mDataZ.

Referenced by LLSurface::decompressDCTPatch().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSurfacePatch::clearDirty (  )  [inline]

Definition at line 133 of file llsurfacepatch.h.

References FALSE, and mDirty.

Referenced by LLSurface::idleUpdate().

Here is the caller graph for this function:

void LLSurfacePatch::clearVObj (  ) 

Definition at line 1010 of file llsurfacepatch.cpp.

References mVObjp, and NULL.

Referenced by LLVOSurfacePatch::markDead().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 139 of file llsurfacepatch.h.

Referenced by LLSurface::createPatchData(), dirtyZ(), and updateTexture().

Definition at line 142 of file llsurfacepatch.h.

Referenced by getNeighborPatch(), and setNeighborPatch().

Definition at line 145 of file llsurfacepatch.h.

Referenced by clearDirty(), dirty(), and LLSurfacePatch().

Definition at line 146 of file llsurfacepatch.h.

Referenced by dirty(), LLSurfacePatch(), and updateVerticalStats().

Definition at line 147 of file llsurfacepatch.h.

Referenced by dirty(), LLSurfacePatch(), and updateTexture().

Definition at line 149 of file llsurfacepatch.h.

Definition at line 151 of file llsurfacepatch.h.

Referenced by calcNormal(), getNormal(), and setDataNorm().

Definition at line 160 of file llsurfacepatch.h.

Referenced by eval(), getOriginAgent(), getOriginGlobal(), and setOriginGlobal().

Definition at line 161 of file llsurfacepatch.h.

Referenced by eval(), LLSurfacePatch(), and setOriginGlobal().

Definition at line 166 of file llsurfacepatch.h.

Referenced by getMinZ(), LLSurfacePatch(), and updateVerticalStats().

Definition at line 166 of file llsurfacepatch.h.

Referenced by getMaxZ(), LLSurfacePatch(), and updateVerticalStats().

Definition at line 166 of file llsurfacepatch.h.

Referenced by LLSurfacePatch(), and updateVerticalStats().

Definition at line 169 of file llsurfacepatch.h.

Referenced by getMinComposition(), LLSurfacePatch(), and updateCompositionStats().

Definition at line 170 of file llsurfacepatch.h.

Referenced by getMaxComposition(), LLSurfacePatch(), and updateCompositionStats().

Definition at line 171 of file llsurfacepatch.h.

Referenced by getMeanComposition(), LLSurfacePatch(), and updateCompositionStats().

Definition at line 175 of file llsurfacepatch.h.

Referenced by dirtyZ(), and getLastUpdateTime().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:09:17 2008 for SecondLife by  doxygen 1.5.5