summaryrefslogtreecommitdiff
path: root/indra/llmath/v3math.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-16 16:11:56 -0500
committerDave Parks <davep@lindenlab.com>2011-05-16 16:11:56 -0500
commit26f321bf6530734173792f92316b32c470cc1b20 (patch)
treeb6c913bc714ce29ee559a0da49c6318051637789 /indra/llmath/v3math.cpp
parent113f532ee57eeeca4dc7eb6ca05f923f1f3543d3 (diff)
parent8ae550996c70df16b707f6773666b93409123689 (diff)
merge
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 )