diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-09 12:26:09 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-09 12:26:09 -0600 |
commit | 2cb5b0b66ec9633d4c6563acf5ff9d0f7bc7cbf7 (patch) | |
tree | dd1a45e1d20de72c15d51f57a188ee471a1ea7d2 /indra | |
parent | 22bcd0e0eaeda849fbb1a8ecd78eeee7a219c614 (diff) |
consolidate button work in progress
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 de32070da1..596c5fe231 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5468,6 +5468,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 e3ab648fe3..1bf6fac305 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -805,6 +805,8 @@ public: BOOL create(LLVolume* volume, BOOL partial_build = FALSE); void createBinormals(); + void appendFace(const LLVolumeFace& face); + class VertexData { public: |