diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-24 13:24:12 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-24 13:24:12 -0400 |
commit | c5abb4b116d0b31a74059dcb4b338654ca7bedfe (patch) | |
tree | 9537d70b120c7e3f31c97c87e3573c1bbf8ac0b0 /indra/newview/llpolymorph.cpp | |
parent | fb1facf13a2f7413b42802bd7293d504eb4e4174 (diff) | |
parent | 45a43256ae71ec7936fc73e3b9c41470a23dd229 (diff) |
merge latest avatar-physics updates
Diffstat (limited to 'indra/newview/llpolymorph.cpp')
-rw-r--r-- | indra/newview/llpolymorph.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index ec41ef08f5..5a67fd482a 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -59,6 +59,37 @@ LLPolyMorphData::LLPolyMorphData(const std::string& morph_name) mMesh = NULL; } +LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : + mName(rhs.mName), + mNumIndices(rhs.mNumIndices), + mTotalDistortion(rhs.mTotalDistortion), + mAvgDistortion(rhs.mAvgDistortion), + mMaxDistortion(rhs.mMaxDistortion), + mVertexIndices(NULL), + mCoords(NULL), + mNormals(NULL), + mBinormals(NULL), + mTexCoords(NULL) +{ + const S32 numVertices = mNumIndices; + + mCoords = new LLVector3[numVertices]; + mNormals = new LLVector3[numVertices]; + mBinormals = new LLVector3[numVertices]; + mTexCoords = new LLVector2[numVertices]; + mVertexIndices = new U32[numVertices]; + + for (S32 v=0; v < numVertices; v++) + { + mCoords[v] = rhs.mCoords[v]; + mNormals[v] = rhs.mNormals[v]; + mBinormals[v] = rhs.mBinormals[v]; + mTexCoords[v] = rhs.mTexCoords[v]; + mVertexIndices[v] = rhs.mVertexIndices[v]; + } +} + + //----------------------------------------------------------------------------- // ~LLPolyMorphData() //----------------------------------------------------------------------------- |