summaryrefslogtreecommitdiff
path: root/indra/llmath/v3math.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-05-26 18:34:41 -0400
committerDebi King (Dessie) <dessie@lindenlab.com>2011-05-26 18:34:41 -0400
commitd5f96c38e6f5838672c87e540aaaa3b1663837f8 (patch)
tree3aac617ceed3eb3ae2a1aa6cfaca9bb96d4ff4c7 /indra/llmath/v3math.cpp
parent84202f19a52b8d04bf900a72acf4214b73acc820 (diff)
parent4b7793a119f4e4c8c4f03b6ff9adb0eb6fe94209 (diff)
merge from viewer-pre-beta
Diffstat (limited to 'indra/llmath/v3math.cpp')
-rw-r--r--indra/llmath/v3math.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index 18b15e08c4..e7107dee16 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -206,6 +206,28 @@ const LLVector3& LLVector3::rotVec(const LLQuaternion &q)
return *this;
}
+const LLVector3& LLVector3::transVec(const LLMatrix4& mat)
+{
+ setVec(
+ mV[VX] * mat.mMatrix[VX][VX] +
+ mV[VY] * mat.mMatrix[VX][VY] +
+ mV[VZ] * mat.mMatrix[VX][VZ] +
+ mat.mMatrix[VX][VW],
+
+ mV[VX] * mat.mMatrix[VY][VX] +
+ mV[VY] * mat.mMatrix[VY][VY] +
+ mV[VZ] * mat.mMatrix[VY][VZ] +
+ mat.mMatrix[VY][VW],
+
+ mV[VX] * mat.mMatrix[VZ][VX] +
+ mV[VY] * mat.mMatrix[VZ][VY] +
+ mV[VZ] * mat.mMatrix[VZ][VZ] +
+ mat.mMatrix[VZ][VW]);
+
+ return *this;
+}
+
+
const LLVector3& LLVector3::rotVec(F32 angle, const LLVector3 &vec)
{
if ( !vec.isExactlyZero() && angle )