47 #ifndef AI_VECTOR2D_H_INC
48 #define AI_VECTOR2D_H_INC
51 # pragma GCC system_header
67 template <
typename TReal>
70 aiVector2t () : x(), y() {}
71 aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
72 explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
73 aiVector2t (
const aiVector2t& o) =
default;
75 void Set( TReal pX, TReal pY);
76 TReal SquareLength()
const ;
77 TReal Length()
const ;
78 aiVector2t& Normalize();
80 const aiVector2t& operator += (
const aiVector2t& o);
81 const aiVector2t& operator -= (
const aiVector2t& o);
82 const aiVector2t& operator *= (TReal f);
83 const aiVector2t& operator /= (TReal f);
85 TReal operator[](
unsigned int i)
const;
87 bool operator== (
const aiVector2t& other)
const;
88 bool operator!= (
const aiVector2t& other)
const;
90 bool Equal(
const aiVector2t& other, TReal epsilon = 1e-6)
const;
92 aiVector2t& operator= (TReal f);
93 const aiVector2t SymMul(
const aiVector2t& o);
95 template <
typename TOther>
96 operator aiVector2t<TOther> ()
const;
109 #endif // __cplusplus
111 #endif // AI_VECTOR2D_H_INC