diff options
author | Dave Parks <davep@lindenlab.com> | 2011-06-09 00:29:37 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-06-09 00:29:37 -0500 |
commit | 75e366dd6f9abd50263c87e0e8106dc0abbcefb4 (patch) | |
tree | f53c8ca99c0a9add07b352c4ef04b7de64281271 /indra/newview/llfloatermodelwizard.cpp | |
parent | 3ede390b87507cd6a6ef31ac3f1be1906abcb723 (diff) | |
parent | 6d953e60b74538aa26b7bfe4ceeee44ac7eefead (diff) |
merge
Diffstat (limited to 'indra/newview/llfloatermodelwizard.cpp')
-rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index e44737f39e..0cd66fbdc2 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -438,54 +438,7 @@ LLFloaterModelWizard::DecompRequest::DecompRequest(const std::string& stage, LLM mParams = sInstance->mDecompParams; //copy out positions and indices - if (mdl) - { - U16 index_offset = 0; - U16 tri[3] ; - - mPositions.clear(); - mIndices.clear(); - mBBox[1] = LLVector3(F32_MIN, F32_MIN, F32_MIN) ; - mBBox[0] = LLVector3(F32_MAX, F32_MAX, F32_MAX) ; - - //queue up vertex positions and indices - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) - { - const LLVolumeFace& face = mdl->getVolumeFace(i); - if (mPositions.size() + face.mNumVertices > 65535) - { - continue; - } - - for (U32 j = 0; j < face.mNumVertices; ++j) - { - mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr())); - for(U32 k = 0 ; k < 3 ; k++) - { - mBBox[0].mV[k] = llmin(mBBox[0].mV[k], mPositions[j].mV[k]) ; - mBBox[1].mV[k] = llmax(mBBox[1].mV[k], mPositions[j].mV[k]) ; - } - } - - updateTriangleAreaThreshold() ; - - for (U32 j = 0; j+2 < face.mNumIndices; j += 3) - { - tri[0] = face.mIndices[j] + index_offset ; - tri[1] = face.mIndices[j + 1] + index_offset ; - tri[2] = face.mIndices[j + 2] + index_offset ; - - if(isValidTriangle(tri[0], tri[1], tri[2])) - { - mIndices.push_back(tri[0]); - mIndices.push_back(tri[1]); - mIndices.push_back(tri[2]); - } - } - - index_offset += face.mNumVertices; - } - } + assignData(mdl) ; } |