summaryrefslogtreecommitdiff
path: root/indra/llmath/llmatrix4a.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
commit23f2631d598b6e07450a96ed1ec00670c8867cdd (patch)
tree20195c1688ad8cb7e8631c97fa5920624f10972c /indra/llmath/llmatrix4a.h
parent54334ff6e377e35c97df3a0fe2a859795ec07b21 (diff)
parent8ce3323269d95f54e2b768c4c5aa154d4afbbb6b (diff)
Merge branch 'develop' into nat/edu-channel
Diffstat (limited to 'indra/llmath/llmatrix4a.h')
-rw-r--r--indra/llmath/llmatrix4a.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h
index cf4e522467..3b423f783a 100644
--- a/indra/llmath/llmatrix4a.h
+++ b/indra/llmath/llmatrix4a.h
@@ -46,6 +46,34 @@ public:
loadu(val);
}
+ explicit LLMatrix4a(const F32* val)
+ {
+ loadu(val);
+ }
+
+ static const LLMatrix4a& identity()
+ {
+ static const F32 v[] =
+ { 1.f, 0.f, 0.f, 0.f,
+ 0.f, 1.f, 0.f, 0.f,
+ 0.f, 0.f, 1.f, 0.f,
+ 0.f, 0.f, 0.f, 1.f
+ };
+ static LLMatrix4a identity_mat(v);
+
+ return identity_mat;
+ }
+
+ bool operator==(const LLMatrix4a& rhs) const
+ {
+ return mMatrix[0] == rhs.mMatrix[0] && mMatrix[1] == rhs.mMatrix[1] && mMatrix[2] == rhs.mMatrix[2] && mMatrix[3] == rhs.mMatrix[3];
+ }
+
+ bool operator!=(const LLMatrix4a& rhs) const
+ {
+ return !(*this == rhs);
+ }
+
inline F32* getF32ptr()
{
return (F32*) &mMatrix;