LLFace Class Reference

#include <llface.h>

Collaboration diagram for LLFace:

Collaboration graph
[legend]

List of all members.

Public Types

enum  EMasks {
  LIGHT = 0x0001, GLOBAL = 0x0002, FULLBRIGHT = 0x0004, HUD_RENDER = 0x0008,
  USE_FACE_COLOR = 0x0010, TEXTURE_ANIM = 0x0020
}

Public Member Functions

 LLFace (LLDrawable *drawablep, LLViewerObject *objp)
 ~LLFace ()
const LLMatrix4getWorldMatrix () const
const LLMatrix4getRenderMatrix () const
U32 getIndicesCount () const
S32 getIndicesStart () const
U16 getGeomCount () const
U16 getGeomIndex () const
U16 getGeomStart () const
LLViewerImagegetTexture () const
void setTexture (LLViewerImage *tex)
LLXformMatrixgetXform () const
BOOL hasGeometry () const
LLVector3 getPositionAgent () const
U32 getState () const
void setState (U32 state)
void clearState (U32 state)
BOOL isState (U32 state) const
void setVirtualSize (F32 size)
void setPixelArea (F32 area)
F32 getVirtualSize () const
F32 getPixelArea () const
void bindTexture (S32 stage=0) const
void renderSetColor () const
S32 renderElements (const U16 *index_array) const
S32 renderIndexed ()
S32 renderIndexed (U32 mask)
S32 pushVertices (const U16 *index_array) const
void setWorldMatrix (const LLMatrix4 &mat)
const LLTextureEntrygetTextureEntry () const
LLFacePoolgetPool () const
U32 getPoolType () const
LLDrawablegetDrawable () const
LLViewerObjectgetViewerObject () const
S32 getLOD () const
LLVertexBuffergetVertexBuffer () const
void setPoolType (U32 type)
S32 getTEOffset ()
void setViewerObject (LLViewerObject *object)
void setPool (LLFacePool *pool, LLViewerImage *texturep)
void setDrawable (LLDrawable *drawable)
void setTEOffset (const S32 te_offset)
void setFaceColor (const LLColor4 &color)
void unsetFaceColor ()
const LLColor4getFaceColor () const
const LLColor4getRenderColor () const
BOOL getGeometryVolume (const LLVolume &volume, const S32 &f, const LLMatrix4 &mat_vert, const LLMatrix3 &mat_normal, const U16 &index_offset)
U16 getGeometryAvatar (LLStrider< LLVector3 > &vertices, LLStrider< LLVector3 > &normals, LLStrider< LLVector2 > &texCoords, LLStrider< F32 > &vertex_weights, LLStrider< LLVector4 > &clothing_weights)
U16 getGeometry (LLStrider< LLVector3 > &vertices, LLStrider< LLVector3 > &normals, LLStrider< LLVector2 > &texCoords, LLStrider< U16 > &indices)
S32 getColors (LLStrider< LLColor4U > &colors)
S32 getIndices (LLStrider< U16 > &indices)
void setSize (const S32 numVertices, const S32 num_indices=0)
BOOL genVolumeBBoxes (const LLVolume &volume, S32 f, const LLMatrix4 &mat, const LLMatrix3 &inv_trans_mat, BOOL global_volume=FALSE)
void init (LLDrawable *drawablep, LLViewerObject *objp)
void destroy ()
void update ()
void updateCenterAgent ()
void renderSelectedUV (const S32 offset=0, const S32 count=0)
void renderForSelect (U32 data_mask=LLVertexBuffer::MAP_VERTEX|LLVertexBuffer::MAP_TEXCOORD)
void renderSelected (LLImageGL *image, const LLColor4 &color)
F32 getKey () const
S32 getReferenceIndex () const
void setReferenceIndex (const S32 index)
BOOL verify (const U32 *indices_array=NULL) const
void printDebugInfo () const
void setGeomIndex (U16 idx)
void setIndicesIndex (S32 idx)

Static Public Member Functions

static void initClass ()

Public Attributes

LLVector3 mCenterLocal
LLVector3 mCenterAgent
LLVector3 mExtents [2]
LLVector2 mTexExtents [2]
F32 mDistance
LLPointer< LLVertexBuffermVertexBuffer
LLPointer< LLVertexBuffermLastVertexBuffer
F32 mLastUpdateTime
F32 mLastMoveTime
LLMatrix4mTextureMatrix

Protected Attributes

U32 mState
LLFacePoolmDrawPoolp
U32 mPoolType
LLColor4 mFaceColor
U16 mGeomCount
U16 mGeomIndex
U32 mIndicesCount
U32 mIndicesIndex
U16 mLastGeomCount
U16 mLastGeomIndex
U32 mLastIndicesCount
U32 mLastIndicesIndex
LLXformMatrixmXform
LLPointer< LLViewerImagemTexture
LLPointer< LLDrawablemDrawablep
LLPointer< LLViewerObjectmVObjp
S32 mTEOffset
S32 mReferenceIndex
F32 mVSize
F32 mPixelArea

Static Protected Attributes

static BOOL sSafeRenderSelect = TRUE

Friends

class LLGeometryManager
class LLVolumeGeometryManager

Classes

struct  CompareBatchBreaker
struct  CompareDistanceGreater
struct  CompareTexture
struct  CompareTextureAndGeomCount
struct  CompareTextureAndLOD
struct  CompareTextureAndTime


Detailed Description

Definition at line 61 of file llface.h.


Member Enumeration Documentation

Enumerator:
LIGHT 
GLOBAL 
FULLBRIGHT 
HUD_RENDER 
USE_FACE_COLOR 
TEXTURE_ANIM 

Definition at line 65 of file llface.h.


Constructor & Destructor Documentation

LLFace::LLFace ( LLDrawable drawablep,
LLViewerObject objp 
) [inline]

Definition at line 78 of file llface.h.

References init().

Here is the call graph for this function:

LLFace::~LLFace (  )  [inline]

Definition at line 79 of file llface.h.

References destroy().

Here is the call graph for this function:


Member Function Documentation

void LLFace::initClass (  )  [static]

Definition at line 198 of file llface.cpp.

Referenced by idle_startup().

Here is the caller graph for this function:

const LLMatrix4& LLFace::getWorldMatrix (  )  const [inline]

Definition at line 81 of file llface.h.

References mVObjp, and mXform.

const LLMatrix4 & LLFace::getRenderMatrix (  )  const

Definition at line 1234 of file llface.cpp.

References mDrawablep.

Referenced by getPositionAgent(), renderElements(), renderForSelect(), renderSelectedUV(), and updateCenterAgent().

Here is the caller graph for this function:

U32 LLFace::getIndicesCount (  )  const [inline]

S32 LLFace::getIndicesStart (  )  const [inline]

Definition at line 84 of file llface.h.

References mIndicesIndex.

Referenced by LLParticlePartition::getGeometry(), pushVerts(), LLVolumeGeometryManager::rebuildGeom(), LLVolumeGeometryManager::registerFace(), renderOctree(), and renderSelectedUV().

Here is the caller graph for this function:

U16 LLFace::getGeomCount (  )  const [inline]

U16 LLFace::getGeomIndex (  )  const [inline]

U16 LLFace::getGeomStart (  )  const [inline]

Definition at line 87 of file llface.h.

References mGeomIndex.

Referenced by printDebugInfo(), pushVerts(), and verify().

Here is the caller graph for this function:

LLViewerImage* LLFace::getTexture (  )  const [inline]

void LLFace::setTexture ( LLViewerImage tex  )  [inline]

LLXformMatrix* LLFace::getXform (  )  const [inline]

Definition at line 90 of file llface.h.

References mXform.

BOOL LLFace::hasGeometry (  )  const [inline]

LLVector3 LLFace::getPositionAgent (  )  const

Definition at line 1302 of file llface.cpp.

References getRenderMatrix(), mCenterAgent, mCenterLocal, and mDrawablep.

Referenced by LLVOVolume::getTextureVirtualSize().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLFace::getState (  )  const [inline]

Definition at line 94 of file llface.h.

References mState.

Referenced by printDebugInfo().

Here is the caller graph for this function:

void LLFace::setState ( U32  state  )  [inline]

void LLFace::clearState ( U32  state  )  [inline]

Definition at line 96 of file llface.h.

References mState.

Referenced by getGeometryVolume(), unsetFaceColor(), LLVOVolume::updateFaceFlags(), and LLVOPartGroup::updateGeometry().

Here is the caller graph for this function:

BOOL LLFace::isState ( U32  state  )  const [inline]

void LLFace::setVirtualSize ( F32  size  )  [inline]

Definition at line 98 of file llface.h.

References mVSize.

Referenced by LLVOPartGroup::updateGeometry(), and LLVOVolume::updateTextures().

Here is the caller graph for this function:

void LLFace::setPixelArea ( F32  area  )  [inline]

Definition at line 99 of file llface.h.

References mPixelArea.

Referenced by LLVOVolume::getTextureVirtualSize(), and LLVOVolume::updateTextures().

Here is the caller graph for this function:

F32 LLFace::getVirtualSize (  )  const [inline]

F32 LLFace::getPixelArea (  )  const [inline]

Definition at line 101 of file llface.h.

References mPixelArea.

Referenced by renderTexturePriority(), and LLVOVolume::updateTextures().

Here is the caller graph for this function:

void LLFace::bindTexture ( S32  stage = 0  )  const [inline]

Definition at line 102 of file llface.h.

References LLViewerImage::bindTexture(), and mTexture.

Referenced by LLFacePool::drawLoopSetTex(), LLDrawPoolWater::render(), and LLDrawPoolWater::shade().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::renderSetColor (  )  const

Definition at line 1213 of file llface.cpp.

References getRenderColor(), LLColor4::mV, and LLFacePool::LLOverrideFaceColor::sOverrideFaceColor.

Here is the call graph for this function:

S32 LLFace::renderElements ( const U16 index_array  )  const

Definition at line 1239 of file llface.cpp.

References getRenderMatrix(), GLOBAL, isState(), pushVertices(), and S32.

Referenced by renderIndexed().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLFace::renderIndexed (  ) 

S32 LLFace::renderIndexed ( U32  mask  ) 

Definition at line 1268 of file llface.cpp.

References LLPointer< Type >::isNull(), mVertexBuffer, and renderElements().

Here is the call graph for this function:

S32 LLFace::pushVertices ( const U16 index_array  )  const

Definition at line 1223 of file llface.cpp.

References LLPipeline::addTrianglesDrawn(), gPipeline, mGeomCount, mGeomIndex, mIndicesCount, mIndicesIndex, mVertexBuffer, and LLVertexBuffer::TRIANGLES.

Referenced by renderElements().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::setWorldMatrix ( const LLMatrix4 mat  ) 

Definition at line 202 of file llface.cpp.

References llendl, and llerrs.

const LLTextureEntry * LLFace::getTextureEntry (  )  const [inline]

LLDrawPool * LLFace::getPool (  )  const [inline]

U32 LLFace::getPoolType (  )  const [inline]

LLDrawable * LLFace::getDrawable (  )  const [inline]

LLViewerObject * LLFace::getViewerObject (  )  const [inline]

S32 LLFace::getLOD (  )  const [inline]

Definition at line 117 of file llface.h.

References mVObjp, and LLPointer< Type >::notNull().

Referenced by LLFace::CompareTextureAndLOD::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

LLVertexBuffer* LLFace::getVertexBuffer (  )  const [inline]

Definition at line 118 of file llface.h.

References mVertexBuffer.

void LLFace::setPoolType ( U32  type  )  [inline]

Definition at line 119 of file llface.h.

References mPoolType.

Referenced by LLDrawable::addFace(), LLParticlePartition::getGeometry(), and LLVolumeGeometryManager::rebuildGeom().

Here is the caller graph for this function:

S32 LLFace::getTEOffset (  )  [inline]

Definition at line 120 of file llface.h.

References mTEOffset.

Referenced by LLParticlePartition::getGeometry(), and LLVolumeGeometryManager::rebuildGeom().

Here is the caller graph for this function:

void LLFace::setViewerObject ( LLViewerObject object  ) 

Definition at line 1195 of file llface.cpp.

References mVObjp.

Referenced by LLVOVolume::regenFaces(), and LLVOPartGroup::updateGeometry().

Here is the caller graph for this function:

void LLFace::setPool ( LLFacePool pool,
LLViewerImage texturep 
)

Definition at line 207 of file llface.cpp.

References LLFacePool::addFace(), gPipeline, llendl, llerrs, LLPipeline::markRebuild(), mDrawablep, mDrawPoolp, mGeomIndex, mTexture, LLMemType::MTYPE_DRAWABLE, LLDrawable::REBUILD_ALL, LLFacePool::removeFace(), and TRUE.

Referenced by LLDrawable::addFace().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::setDrawable ( LLDrawable drawable  ) 

Definition at line 258 of file llface.cpp.

References mDrawablep, LLDrawable::mXform, and mXform.

Referenced by init(), and LLDrawable::mergeFaces().

Here is the caller graph for this function:

void LLFace::setTEOffset ( const S32  te_offset  ) 

void LLFace::setFaceColor ( const LLColor4 color  ) 

Definition at line 247 of file llface.cpp.

References mFaceColor, setState(), and USE_FACE_COLOR.

Referenced by LLVOClouds::getGeometry(), LLSprite::updateFace(), LLVOPartGroup::updateGeometry(), LLVOGround::updateGeometry(), LLVOClouds::updateGeometry(), and LLVOSky::updateReflectionGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::unsetFaceColor (  ) 

Definition at line 253 of file llface.cpp.

References clearState(), and USE_FACE_COLOR.

Here is the call graph for this function:

const LLColor4& LLFace::getFaceColor (  )  const [inline]

Definition at line 131 of file llface.h.

References mFaceColor.

Referenced by LLDrawPoolWater::renderReflection().

Here is the caller graph for this function:

const LLColor4 & LLFace::getRenderColor (  )  const

Definition at line 1200 of file llface.cpp.

References LLTextureEntry::getColor(), getTextureEntry(), isState(), mFaceColor, USE_FACE_COLOR, and LLColor4::white.

Referenced by LLVOAvatar::renderFootShadows(), and renderSetColor().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLFace::getGeometryVolume ( const LLVolume volume,
const S32 f,
const LLMatrix4 mat_vert,
const LLMatrix3 mat_normal,
const U16 index_offset 
)

Definition at line 763 of file llface.cpp.

References BE_BRIGHTNESS, BE_DARKNESS, BE_NO_BUMP, clearState(), cylindricalProjection(), FALSE, LLTextureEntry::getBumpmap(), LLTextureEntry::getColor(), LLSky::getMoonDirection(), getPoolType(), LLTextureEntry::getRotation(), LLTextureEntry::getScale(), LLTextureEntry::getShiny(), LLTextureEntry::getTexGen(), getTextureEntry(), getVirtualSize(), LLVolume::getVolumeFace(), gFrameTimeSeconds, GLOBAL, gSky, i, isState(), llendl, llmax(), llwarns, LLVolumeFace::mCenter, mDrawablep, mGeomCount, mGeomIndex, MIN_TEX_ANIM_SIZE, LLVolumeFace::mIndices, mIndicesCount, mIndicesIndex, mLastGeomCount, mLastGeomIndex, mLastIndicesCount, mLastIndicesIndex, mLastMoveTime, mLastUpdateTime, mLastVertexBuffer, LLTextureEntry::mOffsetS, LLTextureEntry::mOffsetT, LLTextureEntry::mScaleS, LLTextureEntry::mScaleT, LLVOVolume::mTexAnimMode, mTexExtents, mTexture, mTextureMatrix, LLVector2::mV, LLVector3::mV, LLColor4U::mV, mVertexBuffer, LLVolumeFace::mVertices, mVObjp, LLSky::mVOSkyp, LLVector3::normVec(), LLPointer< Type >::notNull(), planarProjection(), LLDrawPool::POOL_ALPHA, r, LLDrawable::REBUILD_ALL, LLDrawable::REBUILD_COLOR, LLDrawable::REBUILD_POSITION, LLDrawable::REBUILD_TCOORD, LLDrawable::REBUILD_VOLUME, S32, LLVector3::scaleVec(), LLMatrix3::setRows(), setState(), LLVector2::setVec(), LLVector3::setVec(), sphericalProjection(), LLPipeline::sRenderBump, tut::tc(), LLTextureEntry::TEX_GEN_CYLINDRICAL, LLTextureEntry::TEX_GEN_DEFAULT, LLTextureEntry::TEX_GEN_PLANAR, LLTextureEntry::TEX_GEN_SPHERICAL, TEXTURE_ANIM, TRUE, VZ, and xform().

Referenced by LLVolumeGeometryManager::rebuildGeom().

Here is the call graph for this function:

Here is the caller graph for this function:

U16 LLFace::getGeometryAvatar ( LLStrider< LLVector3 > &  vertices,
LLStrider< LLVector3 > &  normals,
LLStrider< LLVector2 > &  texCoords,
LLStrider< F32 > &  vertex_weights,
LLStrider< LLVector4 > &  clothing_weights 
)

Definition at line 278 of file llface.cpp.

References mGeomIndex, LLMemType::MTYPE_DRAWABLE, mVertexBuffer, and LLPointer< Type >::notNull().

Referenced by LLViewerJointMesh::updateFaceData().

Here is the call graph for this function:

Here is the caller graph for this function:

U16 LLFace::getGeometry ( LLStrider< LLVector3 > &  vertices,
LLStrider< LLVector3 > &  normals,
LLStrider< LLVector2 > &  texCoords,
LLStrider< U16 > &  indices 
)

S32 LLFace::getColors ( LLStrider< LLColor4U > &  colors  )  [inline]

Definition at line 1283 of file llface.cpp.

References mGeomCount, mGeomIndex, and mVertexBuffer.

S32 LLFace::getIndices ( LLStrider< U16 > &  indices  ) 

Definition at line 1295 of file llface.cpp.

References llassert, mIndicesIndex, and mVertexBuffer.

void LLFace::setSize ( const S32  numVertices,
const S32  num_indices = 0 
)

BOOL LLFace::genVolumeBBoxes ( const LLVolume volume,
S32  f,
const LLMatrix4 mat,
const LLMatrix3 inv_trans_mat,
BOOL  global_volume = FALSE 
)

void LLFace::init ( LLDrawable drawablep,
LLViewerObject objp 
)

void LLFace::destroy (  ) 

Definition at line 178 of file llface.cpp.

References mDrawablep, mDrawPoolp, mTextureMatrix, mVObjp, NULL, and LLFacePool::removeFace().

Referenced by ~LLFace().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::update (  ) 

void LLFace::updateCenterAgent (  ) 

Definition at line 322 of file llface.cpp.

References getRenderMatrix(), mCenterAgent, mCenterLocal, and mDrawablep.

Referenced by genVolumeBBoxes(), and LLDrawable::moveUpdatePipeline().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::renderSelectedUV ( const S32  offset = 0,
const S32  count = 0 
)

void LLFace::renderForSelect ( U32  data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD  ) 

void LLFace::renderSelected ( LLImageGL image,
const LLColor4 color 
)

F32 LLFace::getKey (  )  const [inline]

Definition at line 172 of file llface.h.

References mDistance.

S32 LLFace::getReferenceIndex (  )  const [inline]

Definition at line 174 of file llface.h.

References mReferenceIndex.

Referenced by LLFacePool::addFaceReference(), and LLFacePool::removeFaceReference().

Here is the caller graph for this function:

void LLFace::setReferenceIndex ( const S32  index  )  [inline]

Definition at line 175 of file llface.h.

References mReferenceIndex.

Referenced by LLFacePool::addFaceReference(), and LLFacePool::removeFaceReference().

Here is the caller graph for this function:

BOOL LLFace::verify ( const U32 indices_array = NULL  )  const

Definition at line 1140 of file llface.cpp.

References FALSE, getGeomStart(), getIndicesCount(), i, LL_MAX_INDICES_COUNT, llendl, llinfos, llwarns, mGeomCount, mGeomIndex, mIndicesIndex, mVertexBuffer, printDebugInfo(), S32, and TRUE.

Referenced by LLFacePool::verify().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLFace::printDebugInfo (  )  const

void LLFace::setGeomIndex ( U16  idx  )  [inline]

void LLFace::setIndicesIndex ( S32  idx  )  [inline]


Friends And Related Function Documentation

friend class LLGeometryManager [friend]

Definition at line 198 of file llface.h.

friend class LLVolumeGeometryManager [friend]

Definition at line 199 of file llface.h.


Member Data Documentation

Definition at line 189 of file llface.h.

Referenced by getGeometryVolume(), and LLVOVolume::getTextureVirtualSize().

Definition at line 194 of file llface.h.

Referenced by getGeometryVolume(), init(), and renderOctree().

U32 LLFace::mState [protected]

Definition at line 201 of file llface.h.

Referenced by clearState(), getState(), init(), isState(), and setState().

Definition at line 202 of file llface.h.

Referenced by destroy(), getPool(), init(), renderIndexed(), renderSelectedUV(), and setPool().

U32 LLFace::mPoolType [protected]

Definition at line 203 of file llface.h.

Referenced by getPoolType(), init(), and setPoolType().

Definition at line 204 of file llface.h.

Referenced by getFaceColor(), getRenderColor(), init(), and setFaceColor().

U16 LLFace::mGeomCount [protected]

U16 LLFace::mGeomIndex [protected]

Definition at line 212 of file llface.h.

Referenced by getGeometryVolume(), and init().

Definition at line 213 of file llface.h.

Referenced by getGeometryVolume(), and init().

Definition at line 214 of file llface.h.

Referenced by getGeometryVolume(), and init().

Definition at line 215 of file llface.h.

Referenced by getGeometryVolume(), and init().

Definition at line 217 of file llface.h.

Referenced by getWorldMatrix(), getXform(), and setDrawable().

Definition at line 218 of file llface.h.

Referenced by bindTexture(), getGeometryVolume(), getTexture(), init(), setPool(), and setTexture().

S32 LLFace::mTEOffset [protected]

Definition at line 221 of file llface.h.

Referenced by getTEOffset(), getTextureEntry(), init(), renderForSelect(), and setTEOffset().

Definition at line 223 of file llface.h.

Referenced by getReferenceIndex(), init(), and setReferenceIndex().

F32 LLFace::mVSize [protected]

Definition at line 224 of file llface.h.

Referenced by getVirtualSize(), init(), and setVirtualSize().

F32 LLFace::mPixelArea [protected]

BOOL LLFace::sSafeRenderSelect = TRUE [static, protected]

Definition at line 228 of file llface.h.

Referenced by renderSelectedUV().


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

Generated on Fri May 16 08:44:27 2008 for SecondLife by  doxygen 1.5.5