summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-02-17 11:33:47 -0600
committerDave Parks <davep@lindenlab.com>2010-02-17 11:33:47 -0600
commit3bca0fceb21c0e08908125608059cec0860bafbe (patch)
tree7cb1b35bf1d2e8968273e2a424eafcad8d9f1fe9 /indra/llmath/llvolume.cpp
parent2398ac98d01d3809904759251e2c98cf2740e139 (diff)
parentde88d6ced487fd55fa6f6bb860849979f031a363 (diff)
merge
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 7fd9b57f51..7c98536e72 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5615,6 +5615,37 @@ void LLVolumeFace::createBinormals()
}
}
+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 = 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);
+ }
+ }
+
+
+ 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);