LLVOSurfacePatch Class Reference

#include <llvosurfacepatch.h>

Inheritance diagram for LLVOSurfacePatch:

Inheritance graph
[legend]
Collaboration diagram for LLVOSurfacePatch:

Collaboration graph
[legend]
List of all members.

Public Types

 VERTEX_DATA_MASK
enum  { VERTEX_DATA_MASK }

Public Member Functions

 LLVOSurfacePatch (const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
void markDead ()
virtual U32 getPartitionType () const
LLDrawable * createDrawable (LLPipeline *pipeline)
BOOL updateGeometry (LLDrawable *drawable)
BOOL updateLOD ()
void updateFaceSize (S32 idx)
void getGeometry (LLStrider< LLVector3 > &verticesp, LLStrider< LLVector3 > &normalsp, LLStrider< LLColor4U > &colorsp, LLStrider< LLVector2 > &texCoords0p, LLStrider< LLVector2 > &texCoords1p, LLStrider< U32 > &indicesp)
void updateTextures (LLAgent &agent)
void setPixelAreaAndAngle (LLAgent &agent)
void updateSpatialExtents (LLVector3 &newMin, LLVector3 &newMax)
BOOL isActive () const
void setPatch (LLSurfacePatch *patchp)
LLSurfacePatch * getPatch () const
void dirtyPatch ()
void dirtyGeom ()

Static Public Member Functions

static void initClass ()

Public Attributes

BOOL mDirtiedPatch

Protected Member Functions

 ~LLVOSurfacePatch ()
LLFacePool * getPool ()
void calcColor (const LLVector3 *vertex, const LLVector3 *normal, LLColor4U *colorp)
BOOL updateShadows (BOOL use_shadow_factor=FALSE)
void getGeomSizesMain (const S32 stride, S32 &num_vertices, S32 &num_indices)
void getGeomSizesNorth (const S32 stride, const S32 north_stride, S32 &num_vertices, S32 &num_indices)
void getGeomSizesEast (const S32 stride, const S32 east_stride, S32 &num_vertices, S32 &num_indices)
void updateMainGeometry (LLFace *facep, LLStrider< LLVector3 > &verticesp, LLStrider< LLVector3 > &normalsp, LLStrider< LLColor4U > &colorsp, LLStrider< LLVector2 > &texCoords0p, LLStrider< LLVector2 > &texCoords1p, LLStrider< U32 > &indicesp, U32 &index_offset)
void updateNorthGeometry (LLFace *facep, LLStrider< LLVector3 > &verticesp, LLStrider< LLVector3 > &normalsp, LLStrider< LLColor4U > &colorsp, LLStrider< LLVector2 > &texCoords0p, LLStrider< LLVector2 > &texCoords1p, LLStrider< U32 > &indicesp, U32 &index_offset)
void updateEastGeometry (LLFace *facep, LLStrider< LLVector3 > &verticesp, LLStrider< LLVector3 > &normalsp, LLStrider< LLColor4U > &colorsp, LLStrider< LLVector2 > &texCoords0p, LLStrider< LLVector2 > &texCoords1p, LLStrider< U32 > &indicesp, U32 &index_offset)

Protected Attributes

LLFacePool * mPool
S32 mBaseComp
LLSurfacePatch * mPatchp
BOOL mDirtyTexture
BOOL mDirtyTerrain
S32 mLastNorthStride
S32 mLastEastStride
S32 mLastStride
S32 mLastLength

Detailed Description

Definition at line 42 of file llvosurfacepatch.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
VERTEX_DATA_MASK 

Definition at line 45 of file llvosurfacepatch.h.


Constructor & Destructor Documentation

LLVOSurfacePatch::LLVOSurfacePatch ( const LLUUID &  id,
const LLPCode  pcode,
LLViewerRegion *  regionp 
)

Definition at line 94 of file llvosurfacepatch.cpp.

References f, LLViewerObject::mbCanSelect, LLViewerObject::setScale(), and TRUE.

LLVOSurfacePatch::~LLVOSurfacePatch (  )  [protected]

Definition at line 113 of file llvosurfacepatch.cpp.

References mPatchp, and NULL.


Member Function Documentation

void LLVOSurfacePatch::calcColor ( const LLVector3 *  vertex,
const LLVector3 *  normal,
LLColor4U *  colorp 
) [protected]

Definition at line 832 of file llvosurfacepatch.cpp.

References LLPipeline::getLightingDetail(), gPipeline, light, LLViewerObject::mDrawable, LLColor4::mV, and LLColor4U::setVecScaleClamp().

Referenced by updateEastGeometry(), updateMainGeometry(), and updateNorthGeometry().

LLDrawable * LLVOSurfacePatch::createDrawable ( LLPipeline *  pipeline  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 156 of file llvosurfacepatch.cpp.

References LLPipeline::allocDrawable(), LLSurfacePatch::getMaxComposition(), LLSurfacePatch::getMinComposition(), getPool(), llceil(), llfloor(), mBaseComp, LLViewerObject::mDrawable, mPatchp, NULL, range, LLPipeline::RENDER_TYPE_TERRAIN, and S32.

void LLVOSurfacePatch::dirtyGeom (  ) 

Definition at line 883 of file llvosurfacepatch.cpp.

References gPipeline, LLPipeline::markRebuild(), LLViewerObject::mDrawable, NULL, LLDrawable::REBUILD_ALL, and TRUE.

Referenced by dirtyPatch().

void LLVOSurfacePatch::dirtyPatch (  ) 

Definition at line 869 of file llvosurfacepatch.cpp.

References dirtyGeom(), LLSurfacePatch::getCenterRegion(), LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getMaxZ(), LLSurface::getMetersPerGrid(), LLSurfacePatch::getMinZ(), LLSurfacePatch::getSurface(), mDirtiedPatch, mDirtyTerrain, mPatchp, LLViewerObject::setPositionRegion(), LLViewerObject::setScale(), and TRUE.

Referenced by setPatch().

void LLVOSurfacePatch::getGeometry ( LLStrider< LLVector3 > &  verticesp,
LLStrider< LLVector3 > &  normalsp,
LLStrider< LLColor4U > &  colorsp,
LLStrider< LLVector2 > &  texCoords0p,
LLStrider< LLVector2 > &  texCoords1p,
LLStrider< U32 > &  indicesp 
)

Definition at line 279 of file llvosurfacepatch.cpp.

References LLFace::getGeomIndex(), LLViewerObject::mDrawable, updateEastGeometry(), updateMainGeometry(), and updateNorthGeometry().

Referenced by LLTerrainPartition::getGeometry().

void LLVOSurfacePatch::getGeomSizesEast ( const S32  stride,
const S32  east_stride,
S32 &  num_vertices,
S32 &  num_indices 
) [protected]

Definition at line 932 of file llvosurfacepatch.cpp.

References LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getSurface(), mPatchp, and S32.

Referenced by updateFaceSize().

void LLVOSurfacePatch::getGeomSizesMain ( const S32  stride,
S32 &  num_vertices,
S32 &  num_indices 
) [protected]

Definition at line 893 of file llvosurfacepatch.cpp.

References LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getSurface(), mPatchp, and S32.

Referenced by updateFaceSize(), and updateMainGeometry().

void LLVOSurfacePatch::getGeomSizesNorth ( const S32  stride,
const S32  north_stride,
S32 &  num_vertices,
S32 &  num_indices 
) [protected]

Definition at line 906 of file llvosurfacepatch.cpp.

References LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getSurface(), mPatchp, and S32.

Referenced by updateFaceSize().

U32 LLVOSurfacePatch::getPartitionType (  )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 967 of file llvosurfacepatch.cpp.

References LLPipeline::PARTITION_TERRAIN.

LLSurfacePatch* LLVOSurfacePatch::getPatch (  )  const [inline]

Definition at line 81 of file llvosurfacepatch.h.

References mPatchp.

Referenced by LLDrawPoolTerrain::renderOwnership().

LLFacePool * LLVOSurfacePatch::getPool (  )  [protected]

Definition at line 148 of file llvosurfacepatch.cpp.

References LLPipeline::getPool(), LLSurface::getSTexture(), LLSurfacePatch::getSurface(), gPipeline, mPatchp, mPool, and LLDrawPool::POOL_TERRAIN.

Referenced by createDrawable().

static void LLVOSurfacePatch::initClass (  )  [static]

BOOL LLVOSurfacePatch::isActive (  )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 130 of file llvosurfacepatch.cpp.

References FALSE.

void LLVOSurfacePatch::markDead (  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 119 of file llvosurfacepatch.cpp.

References LLSurfacePatch::clearVObj(), LLViewerObject::markDead(), mPatchp, and NULL.

void LLVOSurfacePatch::setPatch ( LLSurfacePatch *  patchp  ) 

Definition at line 861 of file llvosurfacepatch.cpp.

References dirtyPatch(), and mPatchp.

void LLVOSurfacePatch::setPixelAreaAndAngle ( LLAgent &  agent  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 136 of file llvosurfacepatch.cpp.

References LLViewerObject::mAppAngle, and LLViewerObject::mPixelArea.

void LLVOSurfacePatch::updateEastGeometry ( LLFace *  facep,
LLStrider< LLVector3 > &  verticesp,
LLStrider< LLVector3 > &  normalsp,
LLStrider< LLColor4U > &  colorsp,
LLStrider< LLVector2 > &  texCoords0p,
LLStrider< LLVector2 > &  texCoords1p,
LLStrider< U32 > &  indicesp,
U32 &  index_offset 
) [protected]

Definition at line 634 of file llvosurfacepatch.cpp.

References calcColor(), LLSurfacePatch::eval(), f, LLStrider< Object >::get(), LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getPointAgent(), LLSurfacePatch::getSurface(), i, LLFace::mCenterAgent, mLastEastStride, mLastStride, mPatchp, S32, x, and y.

Referenced by getGeometry().

void LLVOSurfacePatch::updateFaceSize ( S32  idx  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 249 of file llvosurfacepatch.cpp.

References getGeomSizesEast(), getGeomSizesMain(), getGeomSizesNorth(), llendl, llwarns, LLViewerObject::mDrawable, mLastEastStride, mLastNorthStride, mLastStride, S32, and LLFace::setSize().

BOOL LLVOSurfacePatch::updateGeometry ( LLDrawable *  drawable  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 186 of file llvosurfacepatch.cpp.

References EAST, LLFastTimer::FTM_UPDATE_TERRAIN, LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getMaxComposition(), LLSurfacePatch::getMinComposition(), LLSurfacePatch::getNeighborPatch(), LLSurfacePatch::getRenderStride(), LLSurfacePatch::getSurface(), lltrunc(), mBaseComp, mLastEastStride, mLastLength, mLastNorthStride, mLastStride, mPatchp, NORTH, range, S32, and TRUE.

BOOL LLVOSurfacePatch::updateLOD (  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 272 of file llvosurfacepatch.cpp.

References LLDrawable::LIGHTING_BUILT, LLViewerObject::mDrawable, and TRUE.

void LLVOSurfacePatch::updateMainGeometry ( LLFace *  facep,
LLStrider< LLVector3 > &  verticesp,
LLStrider< LLVector3 > &  normalsp,
LLStrider< LLColor4U > &  colorsp,
LLStrider< LLVector2 > &  texCoords0p,
LLStrider< LLVector2 > &  texCoords1p,
LLStrider< U32 > &  indicesp,
U32 &  index_offset 
) [protected]

Definition at line 316 of file llvosurfacepatch.cpp.

References calcColor(), LLSurfacePatch::eval(), LLStrider< Object >::get(), getGeomSizesMain(), LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getPointAgent(), LLSurfacePatch::getSurface(), i, j, LLFace::mCenterAgent, mLastStride, mPatchp, S32, x, and y.

Referenced by getGeometry().

void LLVOSurfacePatch::updateNorthGeometry ( LLFace *  facep,
LLStrider< LLVector3 > &  verticesp,
LLStrider< LLVector3 > &  normalsp,
LLStrider< LLColor4U > &  colorsp,
LLStrider< LLVector2 > &  texCoords0p,
LLStrider< LLVector2 > &  texCoords1p,
LLStrider< U32 > &  indicesp,
U32 &  index_offset 
) [protected]

Definition at line 421 of file llvosurfacepatch.cpp.

References calcColor(), LLSurfacePatch::eval(), f, LLStrider< Object >::get(), LLSurface::getGridsPerPatchEdge(), LLSurfacePatch::getPointAgent(), LLSurfacePatch::getSurface(), i, LLFace::mCenterAgent, mLastNorthStride, mLastStride, mPatchp, S32, x, and y.

Referenced by getGeometry().

BOOL LLVOSurfacePatch::updateShadows ( BOOL  use_shadow_factor = FALSE  )  [protected]

Definition at line 856 of file llvosurfacepatch.cpp.

References FALSE.

void LLVOSurfacePatch::updateSpatialExtents ( LLVector3 &  newMin,
LLVector3 &  newMax 
) [virtual]

Reimplemented from LLViewerObject.

Definition at line 958 of file llvosurfacepatch.cpp.

References f, LLViewerObject::getPositionAgent(), LLXform::getScale(), and LLViewerObject::mDrawable.

void LLVOSurfacePatch::updateTextures ( LLAgent &  agent  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 143 of file llvosurfacepatch.cpp.


Member Data Documentation

S32 LLVOSurfacePatch::mBaseComp [protected]

Definition at line 92 of file llvosurfacepatch.h.

Referenced by createDrawable(), and updateGeometry().

BOOL LLVOSurfacePatch::mDirtiedPatch

Definition at line 86 of file llvosurfacepatch.h.

Referenced by dirtyPatch().

BOOL LLVOSurfacePatch::mDirtyTerrain [protected]

Definition at line 95 of file llvosurfacepatch.h.

Referenced by dirtyPatch().

BOOL LLVOSurfacePatch::mDirtyTexture [protected]

Definition at line 94 of file llvosurfacepatch.h.

S32 LLVOSurfacePatch::mLastEastStride [protected]

Definition at line 98 of file llvosurfacepatch.h.

Referenced by updateEastGeometry(), updateFaceSize(), and updateGeometry().

S32 LLVOSurfacePatch::mLastLength [protected]

Definition at line 100 of file llvosurfacepatch.h.

Referenced by updateGeometry().

S32 LLVOSurfacePatch::mLastNorthStride [protected]

Definition at line 97 of file llvosurfacepatch.h.

Referenced by updateFaceSize(), updateGeometry(), and updateNorthGeometry().

S32 LLVOSurfacePatch::mLastStride [protected]

Definition at line 99 of file llvosurfacepatch.h.

Referenced by updateEastGeometry(), updateFaceSize(), updateGeometry(), updateMainGeometry(), and updateNorthGeometry().

LLSurfacePatch* LLVOSurfacePatch::mPatchp [protected]

Definition at line 93 of file llvosurfacepatch.h.

Referenced by createDrawable(), dirtyPatch(), getGeomSizesEast(), getGeomSizesMain(), getGeomSizesNorth(), getPatch(), getPool(), markDead(), setPatch(), updateEastGeometry(), updateGeometry(), updateMainGeometry(), updateNorthGeometry(), and ~LLVOSurfacePatch().

LLFacePool* LLVOSurfacePatch::mPool [protected]

Definition at line 90 of file llvosurfacepatch.h.

Referenced by getPool().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:12:03 2010 for Second Life Viewer by  doxygen 1.4.7