LLViewerJointMesh Class Reference

#include <llviewerjointmesh.h>

Inheritance diagram for LLViewerJointMesh:

Inheritance graph
[legend]
Collaboration diagram for LLViewerJointMesh:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLViewerJointMesh ()
virtual ~LLViewerJointMesh ()
void getColor (F32 *red, F32 *green, F32 *blue, F32 *alpha)
void setColor (F32 red, F32 green, F32 blue, F32 alpha)
void setSpecular (const LLColor4 &color, F32 shiny)
void setTexture (LLViewerImage *texture)
void setTestTexture (U32 name)
void setLayerSet (LLTexLayerSet *layer_set)
LLPolyMeshgetMesh ()
void setMesh (LLPolyMesh *mesh)
void setupJoint (LLViewerJoint *current_joint)
void uploadJointMatrices ()
void setMeshID (S32 id)
S32 getMeshID ()
void drawBone ()
BOOL isTransparent ()
U32 drawShape (F32 pixelArea, BOOL first_pass)
void updateFaceSizes (U32 &num_vertices, U32 &num_indices, F32 pixel_area)
void updateFaceData (LLFace *face, F32 pixel_area, BOOL damp_wind=FALSE)
BOOL updateLOD (F32 pixel_area, BOOL activate)
void updateGeometry ()
void dump ()
void setIsTransparent (BOOL is_transparent)
BOOL isAnimatable ()
void writeCAL3D (apr_file_t *fp, S32 material_num, LLCharacter *characterp)

Static Public Member Functions

static void updateGeometryOriginal (LLFace *face, LLPolyMesh *mesh)
static void updateGeometryVectorized (LLFace *face, LLPolyMesh *mesh)
static void updateGeometrySSE (LLFace *face, LLPolyMesh *mesh)
static void updateGeometrySSE2 (LLFace *face, LLPolyMesh *mesh)

Static Public Attributes

static BOOL sPipelineRender = FALSE
static U32 sClothingMaskImageName = 0
static EAvatarRenderPass sRenderPass = AVATAR_RENDER_PASS_SINGLE
static LLColor4 sClothingInnerColor
static void(* sUpdateGeometryFunc )(LLFace *face, LLPolyMesh *mesh)

Protected Attributes

LLColor4 mColor
F32 mShiny
LLPointer< LLViewerImagemTexture
LLTexLayerSetmLayerSet
U32 mTestImageName
LLPolyMeshmMesh
BOOL mCullBackFaces
LLFacemFace
U32 mFaceIndexCount
BOOL mIsTransparent
U32 mNumSkinJoints
LLSkinJointmSkinJoints
S32 mMeshID

Private Member Functions

BOOL allocateSkinData (U32 numSkinJoints)
S32 getBoundJointsByIndex (S32 index, S32 &joint_a, S32 &joint_b)
void freeSkinData ()

Detailed Description

Definition at line 68 of file llviewerjointmesh.h.


Constructor & Destructor Documentation

LLViewerJointMesh::LLViewerJointMesh (  ) 

Definition at line 144 of file llviewerjointmesh.cpp.

References FALSE, mColor, mCullBackFaces, mFace, mMesh, mMeshID, mNumSkinJoints, mShiny, mSkinJoints, LLJoint::mUpdateXform, LLViewerJoint::mValid, NULL, and TRUE.

LLViewerJointMesh::~LLViewerJointMesh (  )  [virtual]

Definition at line 177 of file llviewerjointmesh.cpp.

References freeSkinData(), mMesh, mTexture, and NULL.


Member Function Documentation

BOOL LLViewerJointMesh::allocateSkinData ( U32  numSkinJoints  )  [private]

Definition at line 188 of file llviewerjointmesh.cpp.

References mNumSkinJoints, mSkinJoints, and TRUE.

Referenced by setMesh().

void LLViewerJointMesh::drawBone (  )  [virtual]

Reimplemented from LLViewerJoint.

Definition at line 516 of file llviewerjointmesh.cpp.

U32 LLViewerJointMesh::drawShape ( F32  pixelArea,
BOOL  first_pass 
) [virtual]

Reimplemented from LLViewerJoint.

Definition at line 562 of file llviewerjointmesh.cpp.

References LLViewerImage::bind(), LLImageGL::bindExternalTexture(), LLTexLayerSetBuffer::bindTexture(), count, end, f, LLTexLayerSet::getComposite(), LLViewerImageList::getImage(), LLPolyMesh::getNumFaces(), LLFace::getPool(), LLDrawPool::getVertexShaderLevel(), LLJoint::getWorldMatrix(), gImageList, glColor4f, glColor4fv, glMultMatrixf, glPopMatrix, gMaterialIndex, gRenderForSelect, gSpecularIndex, LLTexLayerSet::hasComposite(), LLPolyMesh::hasWeights(), IMG_DEFAULT, IMG_DEFAULT_AVATAR, LLPointer< Type >::isNull(), isTransparent(), llassert, llDrawRangeElements(), llendl, llwarns, mColor, mFace, LLPolyMesh::mFaceIndexCount, LLPolyMesh::mFaceIndexOffset, LLPolyMesh::mFaceVertexCount, LLPolyMesh::mFaceVertexOffset, mIsTransparent, mLayerSet, LLMatrix4::mMatrix, mMesh, mShiny, mTestImageName, mTexture, LLColor4::mV, LLViewerJoint::mValid, LLFace::mVertexBuffer, LLViewerJoint::mVisible, LLPointer< Type >::notNull(), sRenderMask, start, stop_glerror, and uploadJointMatrices().

void LLViewerJointMesh::dump (  )  [virtual]

Reimplemented from LLViewerJoint.

Definition at line 1161 of file llviewerjointmesh.cpp.

References llendl, llinfos, LLJoint::mName, and LLViewerJoint::mValid.

void LLViewerJointMesh::freeSkinData (  )  [private]

Definition at line 240 of file llviewerjointmesh.cpp.

References mNumSkinJoints, mSkinJoints, and NULL.

Referenced by setMesh(), and ~LLViewerJointMesh().

S32 LLViewerJointMesh::getBoundJointsByIndex ( S32  index,
S32 joint_a,
S32 joint_b 
) [private]

Definition at line 198 of file llviewerjointmesh.cpp.

References LLDynamicArray< Type, BlockSize >::count(), LLPolyMesh::getReferenceMesh(), LLPolyMesh::mJointRenderData, mMesh, mNumSkinJoints, and S32.

Referenced by writeCAL3D().

void LLViewerJointMesh::getColor ( F32 red,
F32 green,
F32 blue,
F32 alpha 
)

Definition at line 250 of file llviewerjointmesh.cpp.

References mColor.

LLPolyMesh * LLViewerJointMesh::getMesh (  ) 

Definition at line 314 of file llviewerjointmesh.cpp.

References mMesh.

Referenced by LLVOAvatar::getHeadMesh(), LLVOAvatar::getUpperBodyMesh(), and LLVOAvatar::loadMeshNodes().

S32 LLViewerJointMesh::getMeshID (  )  [inline]

Definition at line 135 of file llviewerjointmesh.h.

References mMeshID.

BOOL LLViewerJointMesh::isAnimatable (  )  [inline, virtual]

Reimplemented from LLJoint.

Definition at line 150 of file llviewerjointmesh.h.

References FALSE.

BOOL LLViewerJointMesh::isTransparent (  )  [virtual]

Reimplemented from LLViewerJoint.

Definition at line 523 of file llviewerjointmesh.cpp.

References mIsTransparent.

Referenced by drawShape().

void LLViewerJointMesh::setColor ( F32  red,
F32  green,
F32  blue,
F32  alpha 
)

Definition at line 261 of file llviewerjointmesh.cpp.

References mColor.

Referenced by LLVOAvatar::loadMeshNodes(), LLVOAvatar::onGlobalColorChanged(), and LLVOAvatar::updateMeshTextures().

void LLViewerJointMesh::setIsTransparent ( BOOL  is_transparent  )  [inline]

Definition at line 148 of file llviewerjointmesh.h.

References mIsTransparent.

Referenced by LLVOAvatar::LLVOAvatar().

void LLViewerJointMesh::setLayerSet ( LLTexLayerSet layer_set  ) 

Definition at line 298 of file llviewerjointmesh.cpp.

References mLayerSet, mTexture, and NULL.

Referenced by LLVOAvatar::updateMeshTextures().

void LLViewerJointMesh::setMesh ( LLPolyMesh mesh  ) 

Definition at line 322 of file llviewerjointmesh.cpp.

References allocateSkinData(), LLJoint::findJoint(), freeSkinData(), LLPolyMesh::getJointNames(), LLPolyMesh::getNumJointNames(), LLPolyMesh::getPosition(), LLJoint::getRoot(), LLPolyMesh::getRotation(), LLPolyMesh::getScale(), LLPolyMesh::hasWeights(), LLPolyMesh::isLOD(), mMesh, mSkinJoints, NULL, LLJoint::setPosition(), LLJoint::setRotation(), LLJoint::setScale(), setupJoint(), and LLSkinJoint::setupSkinJoint().

Referenced by LLVOAvatar::buildCharacter(), and LLVOAvatar::loadMeshNodes().

void LLViewerJointMesh::setMeshID ( S32  id  )  [inline]

Definition at line 132 of file llviewerjointmesh.h.

References mMeshID.

Referenced by LLVOAvatar::LLVOAvatar().

void LLViewerJointMesh::setSpecular ( const LLColor4 color,
F32  shiny 
) [inline]

Definition at line 109 of file llviewerjointmesh.h.

References mShiny.

Referenced by LLVOAvatar::LLVOAvatar().

void LLViewerJointMesh::setTestTexture ( U32  name  )  [inline]

Definition at line 114 of file llviewerjointmesh.h.

References mTestImageName.

Referenced by LLImagePreviewAvatar::setPreviewTarget().

void LLViewerJointMesh::setTexture ( LLViewerImage texture  ) 

Definition at line 281 of file llviewerjointmesh.cpp.

References mLayerSet, mTexture, NULL, and texture.

Referenced by LLVOAvatar::updateMeshTextures(), and LLVOAvatar::useBakedTexture().

void LLViewerJointMesh::setupJoint ( LLViewerJoint current_joint  ) 

Definition at line 369 of file llviewerjointmesh.cpp.

References LLDynamicArray< Type, BlockSize >::count(), LLJoint::getParent(), LLJoint::getWorldMatrix(), LLSkinJoint::mJoint, LLPolyMesh::mJointRenderData, mMesh, mNumSkinJoints, mSkinJoints, NULL, and LLDynamicArray< Type, BlockSize >::put().

Referenced by setMesh().

void LLViewerJointMesh::updateFaceData ( LLFace face,
F32  pixel_area,
BOOL  damp_wind = FALSE 
) [virtual]

Reimplemented from LLViewerJoint.

Definition at line 847 of file llviewerjointmesh.cpp.

References face, LLPolyMesh::getBinormals(), LLPolyMesh::getClothingWeights(), LLPolyMesh::getCoords(), LLPolyMesh::getFaces(), LLPolyMesh::getNormals(), LLPolyMesh::getNumFaces(), LLPolyMesh::getNumVertices(), LLPolyMesh::getTexCoords(), LLPolyMesh::getWeights(), i, j, mFace, LLPolyMesh::mFaceIndexOffset, LLPolyMesh::mFaceVertexOffset, mMesh, LLViewerJoint::mValid, and S32.

void LLViewerJointMesh::updateFaceSizes ( U32 num_vertices,
U32 num_indices,
F32  pixel_area 
) [virtual]

Reimplemented from LLViewerJoint.

Definition at line 827 of file llviewerjointmesh.cpp.

References LLPolyMesh::getNumVertices(), LLPolyMesh::getReferenceMesh(), LLPolyMesh::getSharedData(), LLPolyMesh::mCurVertexCount, LLPolyMesh::mFaceIndexCount, LLPolyMesh::mFaceIndexOffset, LLPolyMesh::mFaceVertexCount, LLPolyMesh::mFaceVertexOffset, mMesh, LLPolyMeshSharedData::mNumTriangleIndices, and LLViewerJoint::mValid.

void LLViewerJointMesh::updateGeometry (  )  [virtual]

Reimplemented from LLViewerJoint.

Definition at line 1020 of file llviewerjointmesh.cpp.

References a, b, FALSE, LLTimer::getElapsedSeconds(), LLTimer::getElapsedTimeF64(), LLShaderMgr::getVertexShaderLevel(), gSavedSettings, gVectorizePerfTest, gVectorizeProcessor, LLPolyMesh::hasWeights(), i, llendl, llinfos, mFace, mMesh, LLViewerJoint::mValid, LLFace::mVertexBuffer, LLPointer< Type >::notNull(), LLControlGroup::setBOOL(), LLShaderMgr::SHADER_AVATAR, sUpdateGeometryFunc, TRUE, updateGeometryOriginal(), and uploadJointMatrices().

void LLViewerJointMesh::updateGeometryOriginal ( LLFace face,
LLPolyMesh mesh 
) [static]

Definition at line 914 of file llviewerjointmesh.cpp.

References f, F32_MAX, LLPolyMesh::getCoords(), LLPolyMesh::getNormals(), LLVertexBuffer::getNormalStrider(), LLPolyMesh::getNumVertices(), LLVertexBuffer::getVertexStrider(), LLPolyMesh::getWeights(), gJointMatUnaligned, gJointRotUnaligned, lerp(), llfloor(), mFace, LLPolyMesh::mFaceVertexOffset, LLMatrix3::mMatrix, LLMatrix4::mMatrix, mMesh, LLFace::mVertexBuffer, S32, VW, VX, VY, and VZ.

Referenced by update_vector_performances(), and updateGeometry().

void LLViewerJointMesh::updateGeometrySSE ( LLFace face,
LLPolyMesh mesh 
) [static]

Definition at line 112 of file llviewerjointmesh_sse.cpp.

References face, and updateGeometryVectorized().

Referenced by update_vector_performances().

void LLViewerJointMesh::updateGeometrySSE2 ( LLFace face,
LLPolyMesh mesh 
) [static]

Definition at line 119 of file llviewerjointmesh_sse2.cpp.

References face, and updateGeometryVectorized().

Referenced by update_vector_performances().

void LLViewerJointMesh::updateGeometryVectorized ( LLFace face,
LLPolyMesh mesh 
) [static]

Definition at line 52 of file llviewerjointmesh_vec.cpp.

References LLDynamicArray< Type, BlockSize >::count(), F32_MAX, face, LLPolyMesh::getCoords(), LLPolyMesh::getNormals(), LLVertexBuffer::getNormalStrider(), LLPolyMesh::getNumVertices(), LLPolyMesh::getReferenceMesh(), LLVertexBuffer::getVertexStrider(), LLPolyMesh::getWeights(), j, LLV4Matrix4::lerp(), llfloor(), LLPolyMesh::mFaceVertexOffset, LLPolyMesh::mJointRenderData, LLV4Matrix4::multiply(), NULL, S32, and LLV4Matrix4::translate().

Referenced by update_vector_performances(), updateGeometrySSE(), and updateGeometrySSE2().

BOOL LLViewerJointMesh::updateLOD ( F32  pixel_area,
BOOL  activate 
) [virtual]

Reimplemented from LLViewerJoint.

Definition at line 906 of file llviewerjointmesh.cpp.

References LLViewerJoint::mValid, LLViewerJoint::setValid(), and TRUE.

void LLViewerJointMesh::uploadJointMatrices (  ) 

Definition at line 431 of file llviewerjointmesh.cpp.

References LLDynamicArray< Type, BlockSize >::count(), FALSE, gAvatarMatrixParam, LLDrawPoolAvatar::getModelView(), LLFace::getPool(), LLPolyMesh::getReferenceMesh(), LLDrawPool::getVertexShaderLevel(), gJointMatUnaligned, gJointPivot, gJointRotUnaligned, i, j, LL_CHARACTER_MAX_JOINTS_PER_MESH, mFace, LLPolyMesh::mJointRenderData, mMesh, LLVector4::mV, NULL, S32, LLMatrix4::translate(), TRUE, and VW.

Referenced by drawShape(), and updateGeometry().

void LLViewerJointMesh::writeCAL3D ( apr_file_t *  fp,
S32  material_num,
LLCharacter characterp 
)

Definition at line 1169 of file llviewerjointmesh.cpp.

References coord, f, getBoundJointsByIndex(), LLCharacter::getCharacterJoint(), LLPolyMesh::getCoords(), LLPolyMesh::getFaces(), LLPolyMesh::getNormals(), LLPolyMesh::getNumFaces(), LLPolyMesh::getNumVertices(), LLJoint::getParent(), LLJoint::getScale(), LLJoint::getSkinOffset(), LLPolyMesh::getTexCoords(), LLPolyMesh::getWeights(), LLPolyMesh::hasWeights(), i, lerp(), llfloor(), LLJoint::mJointNum, mMesh, S32, LLVector3::scaleVec(), VX, VY, and VZ.

Referenced by LLVOAvatar::writeCAL3D().


Member Data Documentation

LLColor4 LLViewerJointMesh::mColor [protected]

Definition at line 71 of file llviewerjointmesh.h.

Referenced by drawShape(), getColor(), LLViewerJointMesh(), and setColor().

BOOL LLViewerJointMesh::mCullBackFaces [protected]

Definition at line 78 of file llviewerjointmesh.h.

Referenced by LLViewerJointMesh().

LLFace* LLViewerJointMesh::mFace [protected]

Definition at line 79 of file llviewerjointmesh.h.

Referenced by drawShape(), LLViewerJointMesh(), updateFaceData(), updateGeometry(), updateGeometryOriginal(), and uploadJointMatrices().

U32 LLViewerJointMesh::mFaceIndexCount [protected]

Definition at line 81 of file llviewerjointmesh.h.

BOOL LLViewerJointMesh::mIsTransparent [protected]

Definition at line 82 of file llviewerjointmesh.h.

Referenced by drawShape(), isTransparent(), and setIsTransparent().

LLTexLayerSet* LLViewerJointMesh::mLayerSet [protected]

Definition at line 75 of file llviewerjointmesh.h.

Referenced by drawShape(), setLayerSet(), and setTexture().

LLPolyMesh* LLViewerJointMesh::mMesh [protected]

Definition at line 77 of file llviewerjointmesh.h.

Referenced by drawShape(), getBoundJointsByIndex(), getMesh(), LLViewerJointMesh(), setMesh(), setupJoint(), updateFaceData(), updateFaceSizes(), updateGeometry(), updateGeometryOriginal(), uploadJointMatrices(), writeCAL3D(), and ~LLViewerJointMesh().

S32 LLViewerJointMesh::mMeshID [protected]

Definition at line 86 of file llviewerjointmesh.h.

Referenced by getMeshID(), LLViewerJointMesh(), and setMeshID().

U32 LLViewerJointMesh::mNumSkinJoints [protected]

Definition at line 84 of file llviewerjointmesh.h.

Referenced by allocateSkinData(), freeSkinData(), getBoundJointsByIndex(), LLViewerJointMesh(), and setupJoint().

F32 LLViewerJointMesh::mShiny [protected]

Definition at line 73 of file llviewerjointmesh.h.

Referenced by drawShape(), LLViewerJointMesh(), and setSpecular().

LLSkinJoint* LLViewerJointMesh::mSkinJoints [protected]

Definition at line 85 of file llviewerjointmesh.h.

Referenced by allocateSkinData(), freeSkinData(), LLViewerJointMesh(), setMesh(), and setupJoint().

U32 LLViewerJointMesh::mTestImageName [protected]

Definition at line 76 of file llviewerjointmesh.h.

Referenced by drawShape(), and setTestTexture().

LLPointer<LLViewerImage> LLViewerJointMesh::mTexture [protected]

Definition at line 74 of file llviewerjointmesh.h.

Referenced by drawShape(), setLayerSet(), setTexture(), and ~LLViewerJointMesh().

LLColor4 LLViewerJointMesh::sClothingInnerColor [static]

Definition at line 93 of file llviewerjointmesh.h.

U32 LLViewerJointMesh::sClothingMaskImageName = 0 [static]

Definition at line 91 of file llviewerjointmesh.h.

BOOL LLViewerJointMesh::sPipelineRender = FALSE [static]

Definition at line 89 of file llviewerjointmesh.h.

EAvatarRenderPass LLViewerJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE [static]

Definition at line 92 of file llviewerjointmesh.h.

Referenced by LLVOAvatar::renderSkinned().

void(* LLViewerJointMesh::sUpdateGeometryFunc)(LLFace *face, LLPolyMesh *mesh) [static]

Definition at line 1018 of file llviewerjointmesh.cpp.

Referenced by update_vector_performances(), and updateGeometry().


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