44 #ifndef AI_VECTOR2D_H_INC 45 #define AI_VECTOR2D_H_INC 53 #include "./Compiler/pushpack1.h" 60 template <
typename TReal>
65 aiVector2t () : x(), y() {}
66 aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
67 explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
68 aiVector2t (
const aiVector2t& o) : x(o.x), y(o.y) {}
72 void Set( TReal pX, TReal pY);
73 TReal SquareLength()
const ;
74 TReal Length()
const ;
75 aiVector2t& Normalize();
79 const aiVector2t& operator += (
const aiVector2t& o);
80 const aiVector2t& operator -= (
const aiVector2t& o);
81 const aiVector2t& operator *= (TReal f);
82 const aiVector2t& operator /= (TReal f);
84 TReal operator[](
unsigned int i)
const;
85 TReal& operator[](
unsigned int i);
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 #include "./Compiler/poppack1.h" 113 #endif // AI_VECTOR2D_H_INC Represents a two-dimensional vector.
Definition: vector2.h:105