diff options
author | Oz Linden <oz@lindenlab.com> | 2011-05-23 11:38:33 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-05-23 11:38:33 -0400 |
commit | 551d17f819ea3dbcdc61cb41a458ab6d893d28cf (patch) | |
tree | 130c90ed3b0f6a4245af843cf9170130d549dc4f /indra/llmath/v3math.cpp | |
parent | 99fe1004a6cb4406bcac790420a5be6269e02723 (diff) | |
parent | e5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff) |
merge latest changes (post-2.7.0) from viewer-development
Diffstat (limited to 'indra/llmath/v3math.cpp')
-rw-r--r-- | indra/llmath/v3math.cpp | 22 |
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 ) |