diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-05-12 17:39:08 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-05-12 17:39:08 -0500 |
| commit | 93696ac019865898d35d37d1e32d7a4b819a0c93 (patch) | |
| tree | afac704c0d5ad56c0bc2ed603e6f0bb15f525431 /indra/llmath/v3math.cpp | |
| parent | 6fcf9e4817a5c245f7779dd030b0ba75dab10e5e (diff) | |
| parent | 4911586023144bd10d6a91f3f1be1e65af0c706d (diff) | |
merge
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 ) |
