diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-09 12:28:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-09 12:28:31 -0600 |
commit | bf087b74d392c62d94b8eea0d08ea8da6266db74 (patch) | |
tree | 6d0977dca752608d728617f0e91d15c372e86074 /indra | |
parent | 871a40f2f290106f9da58dd4d09cec28fbecb0fa (diff) | |
parent | 2cb5b0b66ec9633d4c6563acf5ff9d0f7bc7cbf7 (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmath/llvolume.cpp | 19 | ||||
-rw-r--r-- | indra/llmath/llvolume.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index e725b25332..d1716e1407 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5614,6 +5614,25 @@ void LLVolumeFace::createBinormals() } } +void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& transform, LLMatrix4& norm_transform) +{ + for (U32 i = 0; i < face.mVertices.size(); ++i) + { + VertexData v = face.mVertices[i]; + v.mPosition *= mat; + v.mNormal *= norm_transform; + + + mVertices.push_back(v); + } + + U16 offset = mIndices.size(); + for (U32 i = 0; i < face.mIndices.size(); ++i) + { + mIndices.push_back(face.mIndices[i]+offset); + } +} + BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) { LLMemType m1(LLMemType::MTYPE_VOLUME); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index b871dad22a..1059c29566 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -805,6 +805,8 @@ public: void createBinormals(); void makeTriStrip(); + void appendFace(const LLVolumeFace& face); + class VertexData { public: |