Fixed gcc /mingw building

pull/261/head
Léo Terziman 2013-10-31 11:45:55 +01:00
parent f5e3382d58
commit 2c4e55ac61
11 changed files with 27 additions and 19 deletions

View File

@ -96,9 +96,15 @@ AI_FORCE_INLINE bool aiColor4t<TReal>::operator!= (const aiColor4t<TReal>& other
template <typename TReal>
AI_FORCE_INLINE bool aiColor4t<TReal>::operator< (const aiColor4t<TReal>& 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
)
)
)
)
)
);

View File

@ -93,7 +93,7 @@ public:
bool operator== (const aiMatrix4x4t<TReal>& m) const;
bool operator!= (const aiMatrix4x4t<TReal>& m) const;
bool Equal(const aiMatrix4x4t<TReal>& m, float epsilon = 1e-6) const;
bool Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon = 1e-6) const;
template <typename TOther>
operator aiMatrix3x3t<TOther> () const;

View File

@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "matrix4x4.h"
#include <algorithm>
#include <cmath>
#include <limits>
// ------------------------------------------------------------------------------------------------
@ -129,7 +130,7 @@ inline bool aiMatrix3x3t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
// ---------------------------------------------------------------------------
template<typename TReal>
inline bool aiMatrix3x3t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, float epsilon) const {
inline bool aiMatrix3x3t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
return
std::abs(a1 - m.a1) <= epsilon &&
std::abs(a2 - m.a2) <= epsilon &&

View File

@ -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);

View File

@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "quaternion.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include <math.h>
// ----------------------------------------------------------------------------------------
template <typename TReal>
@ -271,7 +271,7 @@ inline bool aiMatrix4x4t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
// ---------------------------------------------------------------------------
template<typename TReal>
inline bool aiMatrix4x4t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, float epsilon) const {
inline bool aiMatrix4x4t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
return
std::abs(a1 - m.a1) <= epsilon &&
std::abs(a2 - m.a2) <= epsilon &&

View File

@ -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:

View File

@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus
#include "quaternion.h"
#include <cmath>
// ---------------------------------------------------------------------------
template<typename TReal>
bool aiQuaterniont<TReal>::operator== (const aiQuaterniont& o) const
@ -64,7 +66,7 @@ bool aiQuaterniont<TReal>::operator!= (const aiQuaterniont& o) const
// ---------------------------------------------------------------------------
template<typename TReal>
inline bool aiQuaterniont<TReal>::Equal(const aiQuaterniont& o, float epsilon) const {
inline bool aiQuaterniont<TReal>::Equal(const aiQuaterniont& o, TReal epsilon) const {
return
std::abs(x - o.x) <= epsilon &&
std::abs(y - o.y) <= epsilon &&

View File

@ -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 <math.h>
#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);

View File

@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus
#include "vector2.h"
#include <cmath>
// ------------------------------------------------------------------------------------------------
template <typename TReal>
template <typename TOther>
@ -133,7 +135,7 @@ bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
// ---------------------------------------------------------------------------
template<typename TReal>
bool aiVector2t<TReal>::Equal(const aiVector2t& other, float epsilon) const {
bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
return
std::abs(x - other.x) <= epsilon &&
std::abs(y - other.y) <= epsilon;

View File

@ -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 <math.h>
#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 <typename TOther>
operator aiVector3t<TOther> () const;

View File

@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus
#include "vector3.h"
#include <cmath>
// ------------------------------------------------------------------------------------------------
/** Transformation of a vector by a 3x3 matrix */
template <typename TReal>
@ -149,7 +151,7 @@ AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& oth
}
// ---------------------------------------------------------------------------
template<typename TReal>
AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, float epsilon) const {
AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TReal epsilon) const {
return
std::abs(x - other.x) <= epsilon &&
std::abs(y - other.y) <= epsilon &&