diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl index 1b9d173ab..ac70d7b09 100644 --- a/include/assimp/color4.inl +++ b/include/assimp/color4.inl @@ -96,9 +96,15 @@ AI_FORCE_INLINE bool aiColor4t::operator!= (const aiColor4t& other template AI_FORCE_INLINE bool aiColor4t::operator< (const aiColor4t& other) const { return r < other.r || ( - r == other.r && (g < other.g || - g == other.g && (b < other.b || - b == other.b && a < other.a + r == other.r && ( + g < other.g || ( + g == other.g && ( + b < other.b || ( + b == other.b && ( + a < other.a + ) + ) + ) ) ) ); diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index 962ae7249..3881bceec 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -93,7 +93,7 @@ public: bool operator== (const aiMatrix4x4t& m) const; bool operator!= (const aiMatrix4x4t& m) const; - bool Equal(const aiMatrix4x4t& m, float epsilon = 1e-6) const; + bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const; template operator aiMatrix3x3t () const; diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl index bbf3fdc94..b6caef5d1 100644 --- a/include/assimp/matrix3x3.inl +++ b/include/assimp/matrix3x3.inl @@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "matrix4x4.h" #include +#include #include // ------------------------------------------------------------------------------------------------ @@ -129,7 +130,7 @@ inline bool aiMatrix3x3t::operator!= (const aiMatrix4x4t& m) const // --------------------------------------------------------------------------- template -inline bool aiMatrix3x3t::Equal(const aiMatrix4x4t& m, float epsilon) const { +inline bool aiMatrix3x3t::Equal(const aiMatrix4x4t& m, TReal epsilon) const { return std::abs(a1 - m.a1) <= epsilon && std::abs(a2 - m.a2) <= epsilon && diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index f9cc422af..7c6905107 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -97,7 +97,7 @@ public: bool operator== (const aiMatrix4x4t& m) const; bool operator!= (const aiMatrix4x4t& m) const; - bool Equal(const aiMatrix4x4t& m, float epsilon = 1e-6) const; + bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const; // matrix multiplication. aiMatrix4x4t& operator *= (const aiMatrix4x4t& m); diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl index b5f048786..327f6f00c 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "quaternion.h" #include +#include #include -#include // ---------------------------------------------------------------------------------------- template @@ -271,7 +271,7 @@ inline bool aiMatrix4x4t::operator!= (const aiMatrix4x4t& m) const // --------------------------------------------------------------------------- template -inline bool aiMatrix4x4t::Equal(const aiMatrix4x4t& m, float epsilon) const { +inline bool aiMatrix4x4t::Equal(const aiMatrix4x4t& m, TReal epsilon) const { return std::abs(a1 - m.a1) <= epsilon && std::abs(a2 - m.a2) <= epsilon && diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index f6846d49e..9c43499c1 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -79,7 +79,7 @@ public: bool operator== (const aiQuaterniont& o) const; bool operator!= (const aiQuaterniont& o) const; - bool Equal(const aiQuaterniont& o, float epsilon = 1e-6) const; + bool Equal(const aiQuaterniont& o, TReal epsilon = 1e-6) const; public: diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl index 9a5a4e63f..fb07a4b3e 100644 --- a/include/assimp/quaternion.inl +++ b/include/assimp/quaternion.inl @@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef __cplusplus #include "quaternion.h" +#include + // --------------------------------------------------------------------------- template bool aiQuaterniont::operator== (const aiQuaterniont& o) const @@ -64,7 +66,7 @@ bool aiQuaterniont::operator!= (const aiQuaterniont& o) const // --------------------------------------------------------------------------- template -inline bool aiQuaterniont::Equal(const aiQuaterniont& o, float epsilon) const { +inline bool aiQuaterniont::Equal(const aiQuaterniont& o, TReal epsilon) const { return std::abs(x - o.x) <= epsilon && std::abs(y - o.y) <= epsilon && diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h index af50e766c..eaea4457d 100644 --- a/include/assimp/vector2.h +++ b/include/assimp/vector2.h @@ -44,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_VECTOR2D_H_INC #define AI_VECTOR2D_H_INC -#include - #include "./Compiler/pushpack1.h" // ---------------------------------------------------------------------------------- @@ -83,7 +81,7 @@ public: bool operator== (const aiVector2t& other) const; bool operator!= (const aiVector2t& other) const; - bool Equal(const aiVector2t& other, float epsilon = 1e-6) const; + bool Equal(const aiVector2t& other, TReal epsilon = 1e-6) const; aiVector2t& operator= (TReal f); const aiVector2t SymMul(const aiVector2t& o); diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl index d6025e4cd..e357a5e7a 100644 --- a/include/assimp/vector2.inl +++ b/include/assimp/vector2.inl @@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef __cplusplus #include "vector2.h" +#include + // ------------------------------------------------------------------------------------------------ template template @@ -133,7 +135,7 @@ bool aiVector2t::operator!= (const aiVector2t& other) const { // --------------------------------------------------------------------------- template -bool aiVector2t::Equal(const aiVector2t& other, float epsilon) const { +bool aiVector2t::Equal(const aiVector2t& other, TReal epsilon) const { return std::abs(x - other.x) <= epsilon && std::abs(y - other.y) <= epsilon; diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 4f340a66e..e0e683c62 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -44,9 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_VECTOR3D_H_INC #define AI_VECTOR3D_H_INC -#include - - #include "./Compiler/pushpack1.h" #ifdef __cplusplus @@ -86,7 +83,7 @@ public: bool operator== (const aiVector3t& other) const; bool operator!= (const aiVector3t& other) const; - bool Equal(const aiVector3t& other, float epsilon = 1e-6) const; + bool Equal(const aiVector3t& other, TReal epsilon = 1e-6) const; template operator aiVector3t () const; diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl index 159a0b8a9..ae1e4ef03 100644 --- a/include/assimp/vector3.inl +++ b/include/assimp/vector3.inl @@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef __cplusplus #include "vector3.h" +#include + // ------------------------------------------------------------------------------------------------ /** Transformation of a vector by a 3x3 matrix */ template @@ -149,7 +151,7 @@ AI_FORCE_INLINE bool aiVector3t::operator!= (const aiVector3t& oth } // --------------------------------------------------------------------------- template -AI_FORCE_INLINE bool aiVector3t::Equal(const aiVector3t& other, float epsilon) const { +AI_FORCE_INLINE bool aiVector3t::Equal(const aiVector3t& other, TReal epsilon) const { return std::abs(x - other.x) <= epsilon && std::abs(y - other.y) <= epsilon &&