diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-11 18:00:00 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-11 18:00:00 -0600 |
commit | ffcbbf4aaabc652c2050ca6147a9388217cfcaa7 (patch) | |
tree | 2b15ef26812ee108a0493ee72efaf493b084e061 /indra/llmath/llvolume.cpp | |
parent | bf087b74d392c62d94b8eea0d08ea8da6266db74 (diff) |
Multi-threaded asset uploading with proper ordering first draft.
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d1716e1407..7e1517fba7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5614,19 +5614,31 @@ void LLVolumeFace::createBinormals() } } -void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& transform, LLMatrix4& norm_transform) +void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat, LLMatrix4& norm_mat) { + U16 offset = mVertices.size(); + + for (U32 i = 0; i < face.mVertices.size(); ++i) { VertexData v = face.mVertices[i]; - v.mPosition *= mat; - v.mNormal *= norm_transform; + v.mPosition = v.mPosition*mat; + v.mNormal = v.mNormal * norm_mat; mVertices.push_back(v); + + if (offset == 0 && i == 0) + { + mExtents[0] = mExtents[1] = v.mPosition; + } + else + { + update_min_max(mExtents[0], mExtents[1], v.mPosition); + } } - U16 offset = mIndices.size(); + for (U32 i = 0; i < face.mIndices.size(); ++i) { mIndices.push_back(face.mIndices[i]+offset); |