summaryrefslogtreecommitdiff
path: root/indra/llmath/v3math.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-07 12:39:45 -0500
committerDave Parks <davep@lindenlab.com>2010-04-07 12:39:45 -0500
commitb6d3d2281b855448bbeec33b2d229222d75cd6b1 (patch)
tree99b5c533bcf19a4b02247e601939346b6f2151df /indra/llmath/v3math.cpp
parent87cce27de3dd23a40d812a7c9000b1972cb4bca3 (diff)
parent3b7b578733867efaeb9359df69df1fe400de0f10 (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 63683ed496..82aad6550b 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -197,6 +197,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 )