summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-09-02 14:34:06 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-09-02 14:34:06 -0400
commita2875ba53ec02235a0db5734264108c0f0898269 (patch)
treef9dc66183550cda2c3478f72fa7018094da3cd19 /indra/llmath
parent227eb6c4a49724fe513f5d67af68d355d173f951 (diff)
parentd07a8b9965b54fca34b239a51af46b996a58d553 (diff)
merge
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llmatrix4a.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index d141298f69..e11fa1bf72 100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
@@ -121,7 +121,7 @@ public:
res.add(z);
}
- inline void affineTransform(const LLVector4a& v, LLVector4a& res)
+ inline void affineTransformSSE(const LLVector4a& v, LLVector4a& res)
{
LLVector4a x,y,z;
@@ -137,6 +137,20 @@ public:
z.add(mMatrix[3]);
res.setAdd(x,z);
}
+
+ inline void affineTransformNonSSE(const LLVector4a& v, LLVector4a& res)
+ {
+ F32 x = v[0] * mMatrix[0][0] + v[1] * mMatrix[1][0] + v[2] * mMatrix[2][0] + mMatrix[3][0];
+ F32 y = v[0] * mMatrix[0][1] + v[1] * mMatrix[1][1] + v[2] * mMatrix[2][1] + mMatrix[3][1];
+ F32 z = v[0] * mMatrix[0][2] + v[1] * mMatrix[1][2] + v[2] * mMatrix[2][2] + mMatrix[3][2];
+ F32 w = 1.0f;
+ res.set(x,y,z,w);
+ }
+
+ inline void affineTransform(const LLVector4a& v, LLVector4a& res)
+ {
+ affineTransformSSE(v,res);
+ }
};
#endif