diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
commit | 1b67dd855c41f5a0cda7ec2a68d98071986ca703 (patch) | |
tree | ab243607f74f78200787bba5b9b88f07ef1b966f /indra/llappearance/llpolymesh.h | |
parent | 6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff) | |
parent | e1623bb276f83a43ce7a197e388720c05bdefe61 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
# autobuild.xml
# indra/cmake/CMakeLists.txt
# indra/cmake/GoogleMock.cmake
# indra/llaudio/llaudioengine_fmodstudio.cpp
# indra/llaudio/llaudioengine_fmodstudio.h
# indra/llaudio/lllistener_fmodstudio.cpp
# indra/llaudio/lllistener_fmodstudio.h
# indra/llaudio/llstreamingaudio_fmodstudio.cpp
# indra/llaudio/llstreamingaudio_fmodstudio.h
# indra/llcharacter/llmultigesture.cpp
# indra/llcharacter/llmultigesture.h
# indra/llimage/llimage.cpp
# indra/llimage/llimagepng.cpp
# indra/llimage/llimageworker.cpp
# indra/llimage/tests/llimageworker_test.cpp
# indra/llmessage/tests/llmockhttpclient.h
# indra/llprimitive/llgltfmaterial.h
# indra/llrender/llfontfreetype.cpp
# indra/llui/llcombobox.cpp
# indra/llui/llfolderview.cpp
# indra/llui/llfolderviewmodel.h
# indra/llui/lllineeditor.cpp
# indra/llui/lllineeditor.h
# indra/llui/lltextbase.cpp
# indra/llui/lltextbase.h
# indra/llui/lltexteditor.cpp
# indra/llui/lltextvalidate.cpp
# indra/llui/lltextvalidate.h
# indra/llui/lluictrl.h
# indra/llui/llview.cpp
# indra/llwindow/llwindowmacosx.cpp
# indra/newview/app_settings/settings.xml
# indra/newview/llappearancemgr.cpp
# indra/newview/llappearancemgr.h
# indra/newview/llavatarpropertiesprocessor.cpp
# indra/newview/llavatarpropertiesprocessor.h
# indra/newview/llbreadcrumbview.cpp
# indra/newview/llbreadcrumbview.h
# indra/newview/llbreastmotion.cpp
# indra/newview/llbreastmotion.h
# indra/newview/llconversationmodel.h
# indra/newview/lldensityctrl.cpp
# indra/newview/lldensityctrl.h
# indra/newview/llface.inl
# indra/newview/llfloatereditsky.cpp
# indra/newview/llfloatereditwater.cpp
# indra/newview/llfloateremojipicker.h
# indra/newview/llfloaterimsessiontab.cpp
# indra/newview/llfloaterprofiletexture.cpp
# indra/newview/llfloaterprofiletexture.h
# indra/newview/llgesturemgr.cpp
# indra/newview/llgesturemgr.h
# indra/newview/llimpanel.cpp
# indra/newview/llimpanel.h
# indra/newview/llinventorybridge.cpp
# indra/newview/llinventorybridge.h
# indra/newview/llinventoryclipboard.cpp
# indra/newview/llinventoryclipboard.h
# indra/newview/llinventoryfunctions.cpp
# indra/newview/llinventoryfunctions.h
# indra/newview/llinventorygallery.cpp
# indra/newview/lllistbrowser.cpp
# indra/newview/lllistbrowser.h
# indra/newview/llpanelobjectinventory.cpp
# indra/newview/llpanelprofile.cpp
# indra/newview/llpanelprofile.h
# indra/newview/llpreviewgesture.cpp
# indra/newview/llsavedsettingsglue.cpp
# indra/newview/llsavedsettingsglue.h
# indra/newview/lltooldraganddrop.cpp
# indra/newview/llurllineeditorctrl.cpp
# indra/newview/llvectorperfoptions.cpp
# indra/newview/llvectorperfoptions.h
# indra/newview/llviewerparceloverlay.cpp
# indra/newview/llviewertexlayer.cpp
# indra/newview/llviewertexturelist.cpp
# indra/newview/macmain.h
# indra/test/test.cpp
Diffstat (limited to 'indra/llappearance/llpolymesh.h')
-rw-r--r-- | indra/llappearance/llpolymesh.h | 736 |
1 files changed, 368 insertions, 368 deletions
diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h index e0822bf0e7..d3b349c987 100644 --- a/indra/llappearance/llpolymesh.h +++ b/indra/llappearance/llpolymesh.h @@ -1,368 +1,368 @@ -/** - * @file llpolymesh.h - * @brief Implementation of LLPolyMesh class - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLPOLYMESHINTERFACE_H -#define LL_LLPOLYMESHINTERFACE_H - -#include <string> -#include <map> -#include "llstl.h" - -#include "v3math.h" -#include "v2math.h" -#include "llquaternion.h" -#include "llpolymorph.h" -#include "lljoint.h" - -class LLSkinJoint; -class LLAvatarAppearance; -class LLWearable; - -//#define USE_STRIPS // Use tri-strips for rendering. - -//----------------------------------------------------------------------------- -// LLPolyFace -// A set of 4 vertex indices. -// An LLPolyFace can represent either a triangle or quad. -// If the last index is -1, it's a triangle. -//----------------------------------------------------------------------------- -typedef S32 LLPolyFace[3]; - -//struct PrimitiveGroup; - -//----------------------------------------------------------------------------- -// LLPolyMesh -// A polyhedra consisting of any number of triangles and quads. -// All instances contain a set of faces, and optionally may include -// faces grouped into named face sets. -//----------------------------------------------------------------------------- -class LLPolyMorphTarget; - -class LLPolyMeshSharedData -{ - friend class LLPolyMesh; -private: - // transform data - LLVector3 mPosition; - LLQuaternion mRotation; - LLVector3 mScale; - - // vertex data - S32 mNumVertices; - LLVector4a *mBaseCoords; - LLVector4a *mBaseNormals; - LLVector4a *mBaseBinormals; - LLVector2 *mTexCoords; - LLVector2 *mDetailTexCoords; - F32 *mWeights; - - bool mHasWeights; - bool mHasDetailTexCoords; - - // face data - S32 mNumFaces; - LLPolyFace *mFaces; - - // face set data - U32 mNumJointNames; - std::string* mJointNames; - - // morph targets - typedef std::set<LLPolyMorphData*> morphdata_list_t; - morphdata_list_t mMorphData; - - std::map<S32, S32> mSharedVerts; - - LLPolyMeshSharedData* mReferenceData; - S32 mLastIndexOffset; - -public: - // Temporarily... - // Triangle indices - U32 mNumTriangleIndices; - U32 *mTriangleIndices; - -public: - LLPolyMeshSharedData(); - ~LLPolyMeshSharedData(); - -private: - void setupLOD(LLPolyMeshSharedData* reference_data); - - // Frees all mesh memory resources - void freeMeshData(); - - void setPosition( const LLVector3 &pos ) { mPosition = pos; } - void setRotation( const LLQuaternion &rot ) { mRotation = rot; } - void setScale( const LLVector3 &scale ) { mScale = scale; } - - bool allocateVertexData( U32 numVertices ); - - bool allocateFaceData( U32 numFaces ); - - bool allocateJointNames( U32 numJointNames ); - - // Retrieve the number of KB of memory used by this instance - U32 getNumKB(); - - // Load mesh data from file - bool loadMesh( const std::string& fileName ); - -public: - void genIndices(S32 offset); - - const LLVector2 &getUVs(U32 index); - - const S32 *getSharedVert(S32 vert); - - bool isLOD() { return (mReferenceData != NULL); } -}; - - -class LLJointRenderData -{ -public: - LLJointRenderData(const LLMatrix4* world_matrix, LLSkinJoint* skin_joint) : mWorldMatrix(world_matrix), mSkinJoint(skin_joint) {} - ~LLJointRenderData(){} - - const LLMatrix4* mWorldMatrix; - LLSkinJoint* mSkinJoint; -}; - - -class LLPolyMesh -{ -public: - - // Constructor - LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh); - - // Destructor - ~LLPolyMesh(); - - // Requests a mesh by name. - // If the mesh already exists in the global mesh table, it is returned, - // otherwise it is loaded from file, added to the table, and returned. - static LLPolyMesh *getMesh( const std::string &name, LLPolyMesh* reference_mesh = NULL); - - // Frees all loaded meshes. - // This should only be called once you know there are no outstanding - // references to these objects. Generally, upon exit of the application. - static void freeAllMeshes(); - - //-------------------------------------------------------------------- - // Transform Data Access - //-------------------------------------------------------------------- - // Get position - const LLVector3 &getPosition() { - llassert (mSharedData); - return mSharedData->mPosition; - } - - // Get rotation - const LLQuaternion &getRotation() { - llassert (mSharedData); - return mSharedData->mRotation; - } - - // Get scale - const LLVector3 &getScale() { - llassert (mSharedData); - return mSharedData->mScale; - } - - //-------------------------------------------------------------------- - // Vertex Data Access - //-------------------------------------------------------------------- - // Get number of vertices - U32 getNumVertices() { - llassert (mSharedData); - return mSharedData->mNumVertices; - } - - // Returns whether or not the mesh has detail texture coords - bool hasDetailTexCoords() { - llassert (mSharedData); - return mSharedData->mHasDetailTexCoords; - } - - // Returns whether or not the mesh has vertex weights - bool hasWeights() const{ - llassert (mSharedData); - return mSharedData->mHasWeights; - } - - // Get coords - const LLVector4a *getCoords() const{ - return mCoords; - } - - // non const version - LLVector4a *getWritableCoords(); - - // Get normals - const LLVector4a *getNormals() const{ - return mNormals; - } - - // Get normals - const LLVector4a *getBinormals() const{ - return mBinormals; - } - - // Get base mesh normals - const LLVector4a *getBaseNormals() const{ - llassert(mSharedData); - return mSharedData->mBaseNormals; - } - - // Get base mesh normals - const LLVector4a *getBaseBinormals() const{ - llassert(mSharedData); - return mSharedData->mBaseBinormals; - } - - // intermediate morphed normals and output normals - LLVector4a *getWritableNormals(); - LLVector4a *getScaledNormals(); - - LLVector4a *getWritableBinormals(); - LLVector4a *getScaledBinormals(); - - // Get texCoords - const LLVector2 *getTexCoords() const { - return mTexCoords; - } - - // non const version - LLVector2 *getWritableTexCoords(); - - // Get detailTexCoords - const LLVector2 *getDetailTexCoords() const { - llassert (mSharedData); - return mSharedData->mDetailTexCoords; - } - - // Get weights - const F32 *getWeights() const { - llassert (mSharedData); - return mSharedData->mWeights; - } - - F32 *getWritableWeights() const; - - LLVector4a *getWritableClothingWeights(); - - const LLVector4a *getClothingWeights() - { - return mClothingWeights; - } - - //-------------------------------------------------------------------- - // Face Data Access - //-------------------------------------------------------------------- - // Get number of faces - S32 getNumFaces() { - llassert (mSharedData); - return mSharedData->mNumFaces; - } - - // Get faces - LLPolyFace *getFaces() { - llassert (mSharedData); - return mSharedData->mFaces; - } - - U32 getNumJointNames() { - llassert (mSharedData); - return mSharedData->mNumJointNames; - } - - std::string *getJointNames() { - llassert (mSharedData); - return mSharedData->mJointNames; - } - - LLPolyMorphData* getMorphData(const std::string& morph_name); -// void removeMorphData(LLPolyMorphData *morph_target); -// void deleteAllMorphData(); - - LLPolyMeshSharedData *getSharedData() const; - LLPolyMesh *getReferenceMesh() { return mReferenceMesh ? mReferenceMesh : this; } - - // Get indices - U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; } - - bool isLOD() { return mSharedData && mSharedData->isLOD(); } - - void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; } - LLAvatarAppearance* getAvatar() { return mAvatarp; } - - std::vector<LLJointRenderData*> mJointRenderData; - - U32 mFaceVertexOffset; - U32 mFaceVertexCount; - U32 mFaceIndexOffset; - U32 mFaceIndexCount; - U32 mCurVertexCount; -private: - void initializeForMorph(); - - // Dumps diagnostic information about the global mesh table - static void dumpDiagInfo(); - -protected: - // mesh data shared across all instances of a given mesh - LLPolyMeshSharedData *mSharedData; - // Single array of floats for allocation / deletion - F32 *mVertexData; - // deformed vertices (resulting from application of morph targets) - LLVector4a *mCoords; - // deformed normals (resulting from application of morph targets) - LLVector4a *mScaledNormals; - // output normals (after normalization) - LLVector4a *mNormals; - // deformed binormals (resulting from application of morph targets) - LLVector4a *mScaledBinormals; - // output binormals (after normalization) - LLVector4a *mBinormals; - // weight values that mark verts as clothing/skin - LLVector4a *mClothingWeights; - // output texture coordinates - LLVector2 *mTexCoords; - - LLPolyMesh *mReferenceMesh; - - // global mesh list - typedef std::map<std::string, LLPolyMeshSharedData*> LLPolyMeshSharedDataTable; - static LLPolyMeshSharedDataTable sGlobalSharedMeshList; - - // Backlink only; don't make this an LLPointer. - LLAvatarAppearance* mAvatarp; -}; - -#endif // LL_LLPOLYMESHINTERFACE_H - +/**
+ * @file llpolymesh.h
+ * @brief Implementation of LLPolyMesh class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPOLYMESHINTERFACE_H
+#define LL_LLPOLYMESHINTERFACE_H
+
+#include <string>
+#include <map>
+#include "llstl.h"
+
+#include "v3math.h"
+#include "v2math.h"
+#include "llquaternion.h"
+#include "llpolymorph.h"
+#include "lljoint.h"
+
+class LLSkinJoint;
+class LLAvatarAppearance;
+class LLWearable;
+
+//#define USE_STRIPS // Use tri-strips for rendering.
+
+//-----------------------------------------------------------------------------
+// LLPolyFace
+// A set of 4 vertex indices.
+// An LLPolyFace can represent either a triangle or quad.
+// If the last index is -1, it's a triangle.
+//-----------------------------------------------------------------------------
+typedef S32 LLPolyFace[3];
+
+//struct PrimitiveGroup;
+
+//-----------------------------------------------------------------------------
+// LLPolyMesh
+// A polyhedra consisting of any number of triangles and quads.
+// All instances contain a set of faces, and optionally may include
+// faces grouped into named face sets.
+//-----------------------------------------------------------------------------
+class LLPolyMorphTarget;
+
+class LLPolyMeshSharedData
+{
+ friend class LLPolyMesh;
+private:
+ // transform data
+ LLVector3 mPosition;
+ LLQuaternion mRotation;
+ LLVector3 mScale;
+
+ // vertex data
+ S32 mNumVertices;
+ LLVector4a *mBaseCoords;
+ LLVector4a *mBaseNormals;
+ LLVector4a *mBaseBinormals;
+ LLVector2 *mTexCoords;
+ LLVector2 *mDetailTexCoords;
+ F32 *mWeights;
+
+ bool mHasWeights;
+ bool mHasDetailTexCoords;
+
+ // face data
+ S32 mNumFaces;
+ LLPolyFace *mFaces;
+
+ // face set data
+ U32 mNumJointNames;
+ std::string* mJointNames;
+
+ // morph targets
+ typedef std::set<LLPolyMorphData*> morphdata_list_t;
+ morphdata_list_t mMorphData;
+
+ std::map<S32, S32> mSharedVerts;
+
+ LLPolyMeshSharedData* mReferenceData;
+ S32 mLastIndexOffset;
+
+public:
+ // Temporarily...
+ // Triangle indices
+ U32 mNumTriangleIndices;
+ U32 *mTriangleIndices;
+
+public:
+ LLPolyMeshSharedData();
+ ~LLPolyMeshSharedData();
+
+private:
+ void setupLOD(LLPolyMeshSharedData* reference_data);
+
+ // Frees all mesh memory resources
+ void freeMeshData();
+
+ void setPosition( const LLVector3 &pos ) { mPosition = pos; }
+ void setRotation( const LLQuaternion &rot ) { mRotation = rot; }
+ void setScale( const LLVector3 &scale ) { mScale = scale; }
+
+ bool allocateVertexData( U32 numVertices );
+
+ bool allocateFaceData( U32 numFaces );
+
+ bool allocateJointNames( U32 numJointNames );
+
+ // Retrieve the number of KB of memory used by this instance
+ U32 getNumKB();
+
+ // Load mesh data from file
+ bool loadMesh( const std::string& fileName );
+
+public:
+ void genIndices(S32 offset);
+
+ const LLVector2 &getUVs(U32 index);
+
+ const S32 *getSharedVert(S32 vert);
+
+ bool isLOD() { return (mReferenceData != NULL); }
+};
+
+
+class LLJointRenderData
+{
+public:
+ LLJointRenderData(const LLMatrix4* world_matrix, LLSkinJoint* skin_joint) : mWorldMatrix(world_matrix), mSkinJoint(skin_joint) {}
+ ~LLJointRenderData(){}
+
+ const LLMatrix4* mWorldMatrix;
+ LLSkinJoint* mSkinJoint;
+};
+
+
+class LLPolyMesh
+{
+public:
+
+ // Constructor
+ LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh);
+
+ // Destructor
+ ~LLPolyMesh();
+
+ // Requests a mesh by name.
+ // If the mesh already exists in the global mesh table, it is returned,
+ // otherwise it is loaded from file, added to the table, and returned.
+ static LLPolyMesh *getMesh( const std::string &name, LLPolyMesh* reference_mesh = NULL);
+
+ // Frees all loaded meshes.
+ // This should only be called once you know there are no outstanding
+ // references to these objects. Generally, upon exit of the application.
+ static void freeAllMeshes();
+
+ //--------------------------------------------------------------------
+ // Transform Data Access
+ //--------------------------------------------------------------------
+ // Get position
+ const LLVector3 &getPosition() {
+ llassert (mSharedData);
+ return mSharedData->mPosition;
+ }
+
+ // Get rotation
+ const LLQuaternion &getRotation() {
+ llassert (mSharedData);
+ return mSharedData->mRotation;
+ }
+
+ // Get scale
+ const LLVector3 &getScale() {
+ llassert (mSharedData);
+ return mSharedData->mScale;
+ }
+
+ //--------------------------------------------------------------------
+ // Vertex Data Access
+ //--------------------------------------------------------------------
+ // Get number of vertices
+ U32 getNumVertices() {
+ llassert (mSharedData);
+ return mSharedData->mNumVertices;
+ }
+
+ // Returns whether or not the mesh has detail texture coords
+ bool hasDetailTexCoords() {
+ llassert (mSharedData);
+ return mSharedData->mHasDetailTexCoords;
+ }
+
+ // Returns whether or not the mesh has vertex weights
+ bool hasWeights() const{
+ llassert (mSharedData);
+ return mSharedData->mHasWeights;
+ }
+
+ // Get coords
+ const LLVector4a *getCoords() const{
+ return mCoords;
+ }
+
+ // non const version
+ LLVector4a *getWritableCoords();
+
+ // Get normals
+ const LLVector4a *getNormals() const{
+ return mNormals;
+ }
+
+ // Get normals
+ const LLVector4a *getBinormals() const{
+ return mBinormals;
+ }
+
+ // Get base mesh normals
+ const LLVector4a *getBaseNormals() const{
+ llassert(mSharedData);
+ return mSharedData->mBaseNormals;
+ }
+
+ // Get base mesh normals
+ const LLVector4a *getBaseBinormals() const{
+ llassert(mSharedData);
+ return mSharedData->mBaseBinormals;
+ }
+
+ // intermediate morphed normals and output normals
+ LLVector4a *getWritableNormals();
+ LLVector4a *getScaledNormals();
+
+ LLVector4a *getWritableBinormals();
+ LLVector4a *getScaledBinormals();
+
+ // Get texCoords
+ const LLVector2 *getTexCoords() const {
+ return mTexCoords;
+ }
+
+ // non const version
+ LLVector2 *getWritableTexCoords();
+
+ // Get detailTexCoords
+ const LLVector2 *getDetailTexCoords() const {
+ llassert (mSharedData);
+ return mSharedData->mDetailTexCoords;
+ }
+
+ // Get weights
+ const F32 *getWeights() const {
+ llassert (mSharedData);
+ return mSharedData->mWeights;
+ }
+
+ F32 *getWritableWeights() const;
+
+ LLVector4a *getWritableClothingWeights();
+
+ const LLVector4a *getClothingWeights()
+ {
+ return mClothingWeights;
+ }
+
+ //--------------------------------------------------------------------
+ // Face Data Access
+ //--------------------------------------------------------------------
+ // Get number of faces
+ S32 getNumFaces() {
+ llassert (mSharedData);
+ return mSharedData->mNumFaces;
+ }
+
+ // Get faces
+ LLPolyFace *getFaces() {
+ llassert (mSharedData);
+ return mSharedData->mFaces;
+ }
+
+ U32 getNumJointNames() {
+ llassert (mSharedData);
+ return mSharedData->mNumJointNames;
+ }
+
+ std::string *getJointNames() {
+ llassert (mSharedData);
+ return mSharedData->mJointNames;
+ }
+
+ LLPolyMorphData* getMorphData(const std::string& morph_name);
+// void removeMorphData(LLPolyMorphData *morph_target);
+// void deleteAllMorphData();
+
+ LLPolyMeshSharedData *getSharedData() const;
+ LLPolyMesh *getReferenceMesh() { return mReferenceMesh ? mReferenceMesh : this; }
+
+ // Get indices
+ U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; }
+
+ bool isLOD() { return mSharedData && mSharedData->isLOD(); }
+
+ void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
+ LLAvatarAppearance* getAvatar() { return mAvatarp; }
+
+ std::vector<LLJointRenderData*> mJointRenderData;
+
+ U32 mFaceVertexOffset;
+ U32 mFaceVertexCount;
+ U32 mFaceIndexOffset;
+ U32 mFaceIndexCount;
+ U32 mCurVertexCount;
+private:
+ void initializeForMorph();
+
+ // Dumps diagnostic information about the global mesh table
+ static void dumpDiagInfo();
+
+protected:
+ // mesh data shared across all instances of a given mesh
+ LLPolyMeshSharedData *mSharedData;
+ // Single array of floats for allocation / deletion
+ F32 *mVertexData;
+ // deformed vertices (resulting from application of morph targets)
+ LLVector4a *mCoords;
+ // deformed normals (resulting from application of morph targets)
+ LLVector4a *mScaledNormals;
+ // output normals (after normalization)
+ LLVector4a *mNormals;
+ // deformed binormals (resulting from application of morph targets)
+ LLVector4a *mScaledBinormals;
+ // output binormals (after normalization)
+ LLVector4a *mBinormals;
+ // weight values that mark verts as clothing/skin
+ LLVector4a *mClothingWeights;
+ // output texture coordinates
+ LLVector2 *mTexCoords;
+
+ LLPolyMesh *mReferenceMesh;
+
+ // global mesh list
+ typedef std::map<std::string, LLPolyMeshSharedData*> LLPolyMeshSharedDataTable;
+ static LLPolyMeshSharedDataTable sGlobalSharedMeshList;
+
+ // Backlink only; don't make this an LLPointer.
+ LLAvatarAppearance* mAvatarp;
+};
+
+#endif // LL_LLPOLYMESHINTERFACE_H
+
|