diff options
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llmatrix4a.h | 28 | ||||
-rw-r--r-- | indra/llmath/llvector4a.h | 10 | ||||
-rw-r--r-- | indra/llmath/llvolume.h | 6 |
3 files changed, 42 insertions, 2 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; diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 8f0ee4b739..47f2a095a8 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -117,6 +117,16 @@ public: mQ = q; } + bool operator==(const LLVector4a& rhs) const + { + return equals4(rhs); + } + + bool operator!=(const LLVector4a& rhs) const + { + return !(*this == rhs); + } + //////////////////////////////////// // LOAD/STORE //////////////////////////////////// diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index e9261c540c..54d79290b2 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -190,11 +190,13 @@ constexpr U8 LL_SCULPT_TYPE_TORUS = 2; constexpr U8 LL_SCULPT_TYPE_PLANE = 3; constexpr U8 LL_SCULPT_TYPE_CYLINDER = 4; constexpr U8 LL_SCULPT_TYPE_MESH = 5; +constexpr U8 LL_SCULPT_TYPE_GLTF = 6; +constexpr U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_GLTF; + constexpr U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | - LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH; + LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH | LL_SCULPT_TYPE_GLTF; // for value checks, assign new value after adding new types -constexpr U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_MESH; constexpr U8 LL_SCULPT_FLAG_INVERT = 64; constexpr U8 LL_SCULPT_FLAG_MIRROR = 128; |