summaryrefslogtreecommitdiff
path: root/indra/llmath/llmatrix4a.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-11-14 16:20:05 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-11-14 16:20:05 +0200
commit39652180aea043b4e8d0cb1f9a2a484e5ce2a471 (patch)
tree9a2c286caf4e05eb30870e462e04cdf0c4b46f9b /indra/llmath/llmatrix4a.h
parentccd20624e37d74217b5d633fb74ebc81672c53f5 (diff)
parent34770cbf2ef34b7901552057a0823e502d42be1d (diff)
Merged in lindenlab/axon
Diffstat (limited to 'indra/llmath/llmatrix4a.h')
-rw-r--r--indra/llmath/llmatrix4a.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index 216334752a..7ba347062f 100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
@@ -121,7 +121,7 @@ public:
res.add(z);
}
- inline void affineTransformSSE(const LLVector4a& v, LLVector4a& res)
+ inline void affineTransformSSE(const LLVector4a& v, LLVector4a& res) const
{
LLVector4a x,y,z;
@@ -138,7 +138,7 @@ public:
res.setAdd(x,z);
}
- inline void affineTransformNonSSE(const LLVector4a& v, LLVector4a& res)
+ inline void affineTransformNonSSE(const LLVector4a& v, LLVector4a& res) const
{
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];
@@ -147,7 +147,7 @@ public:
res.set(x,y,z,w);
}
- inline void affineTransform(const LLVector4a& v, LLVector4a& res)
+ inline void affineTransform(const LLVector4a& v, LLVector4a& res) const
{
affineTransformSSE(v,res);
}
@@ -176,4 +176,12 @@ inline void matMul(const LLMatrix4a &a, const LLMatrix4a &b, LLMatrix4a &res)
res.mMatrix[3] = row3;
}
+inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m)
+{
+ s << "[" << m.mMatrix[0] << ", " << m.mMatrix[1] << ", " << m.mMatrix[2] << ", " << m.mMatrix[3] << "]";
+ return s;
+}
+
+void matMulBoundBox(const LLMatrix4a &a, const LLVector4a *in_extents, LLVector4a *out_extents);
+
#endif