diff --git a/src/gx/CGxStateBom.cpp b/src/gx/CGxStateBom.cpp index fc9d4cf..0527190 100644 --- a/src/gx/CGxStateBom.cpp +++ b/src/gx/CGxStateBom.cpp @@ -33,20 +33,42 @@ const CGxStateBom& CGxStateBom::operator=(C3Vector& value) { return *this; } -bool CGxStateBom::operator!=(int32_t value) { - return this->m_data.i[0] != value; +bool CGxStateBom::operator==(float value) { + return this->m_data.f[0] == value; } -bool CGxStateBom::operator!=(uint32_t value) { - return this->m_data.i[0] != value; +bool CGxStateBom::operator==(int32_t value) { + return this->m_data.i[0] == value; +} + +bool CGxStateBom::operator==(uint32_t value) { + return this->m_data.u[0] == value; +} + +bool CGxStateBom::operator==(void* value) { + return this->m_data.p == value; +} + +bool CGxStateBom::operator==(C3Vector& value) { + return this->m_data.f[0] == value.x + || this->m_data.f[1] == value.y + || this->m_data.f[2] == value.z; } bool CGxStateBom::operator!=(float value) { - return this->m_data.f[0] != value; + return !(*this == value); +} + +bool CGxStateBom::operator!=(int32_t value) { + return !(*this == value); +} + +bool CGxStateBom::operator!=(uint32_t value) { + return !(*this == value); } bool CGxStateBom::operator!=(void* value) { - return this->m_data.p != value; + return !(*this == value); } bool CGxStateBom::operator!=(C3Vector& value) { diff --git a/src/gx/CGxStateBom.hpp b/src/gx/CGxStateBom.hpp index bff7163..4a3d749 100644 --- a/src/gx/CGxStateBom.hpp +++ b/src/gx/CGxStateBom.hpp @@ -11,6 +11,7 @@ class CGxStateBom { // Member variables union { int32_t i[3]; + uint32_t u[3]; float f[3]; void* p; } m_data; @@ -23,6 +24,11 @@ class CGxStateBom { const CGxStateBom& operator=(uint32_t); const CGxStateBom& operator=(void*); const CGxStateBom& operator=(C3Vector&); + bool operator==(float); + bool operator==(int32_t); + bool operator==(uint32_t); + bool operator==(void*); + bool operator==(C3Vector&); bool operator!=(float); bool operator!=(int32_t); bool operator!=(uint32_t);