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 | |
parent | bf087b74d392c62d94b8eea0d08ea8da6266db74 (diff) |
Multi-threaded asset uploading with proper ordering first draft.
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llvolume.cpp | 20 | ||||
-rw-r--r-- | indra/llmath/llvolume.h | 2 |
2 files changed, 17 insertions, 5 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); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 1059c29566..36811785dc 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -805,7 +805,7 @@ public: void createBinormals(); void makeTriStrip(); - void appendFace(const LLVolumeFace& face); + void appendFace(const LLVolumeFace& face, LLMatrix4& transform, LLMatrix4& normal_tranform); class VertexData { |