summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-02-09 12:26:09 -0600
committerDave Parks <davep@lindenlab.com>2010-02-09 12:26:09 -0600
commit2cb5b0b66ec9633d4c6563acf5ff9d0f7bc7cbf7 (patch)
treedd1a45e1d20de72c15d51f57a188ee471a1ea7d2 /indra/llmath/llvolume.cpp
parent22bcd0e0eaeda849fbb1a8ecd78eeee7a219c614 (diff)
consolidate button work in progress
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp19
1 files changed, 19 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);