Lines Matching refs:Vec2
61 template <class T> class Vec2; variable
68 template <class T> class Vec2
86 Vec2 (); // no initialization
87 explicit Vec2 (T a); // (a a)
88 Vec2 (T a, T b); // (a b)
95 Vec2 (const Vec2 &v);
96 template <class S> Vec2 (const Vec2<S> &v);
98 const Vec2 & operator = (const Vec2 &v);
109 void setValue (const Vec2<S> &v);
115 void getValue (Vec2<S> &v) const;
126 bool operator == (const Vec2<S> &v) const;
129 bool operator != (const Vec2<S> &v) const;
150 bool equalWithAbsError (const Vec2<T> &v, T e) const;
151 bool equalWithRelError (const Vec2<T> &v, T e) const;
157 T dot (const Vec2 &v) const;
158 T operator ^ (const Vec2 &v) const;
166 T cross (const Vec2 &v) const;
167 T operator % (const Vec2 &v) const;
174 const Vec2 & operator += (const Vec2 &v);
175 Vec2 operator + (const Vec2 &v) const;
182 const Vec2 & operator -= (const Vec2 &v);
183 Vec2 operator - (const Vec2 &v) const;
190 Vec2 operator - () const;
191 const Vec2 & negate ();
198 const Vec2 & operator *= (const Vec2 &v);
199 const Vec2 & operator *= (T a);
200 Vec2 operator * (const Vec2 &v) const;
201 Vec2 operator * (T a) const;
208 const Vec2 & operator /= (const Vec2 &v);
209 const Vec2 & operator /= (T a);
210 Vec2 operator / (const Vec2 &v) const;
211 Vec2 operator / (T a) const;
226 const Vec2 & normalize (); // modifies *this
227 const Vec2 & normalizeExc () throw (Iex::MathExc);
228 const Vec2 & normalizeNonNull ();
230 Vec2<T> normalized () const; // does not modify *this
231 Vec2<T> normalizedExc () const throw (Iex::MathExc);
232 Vec2<T> normalizedNonNull () const;
665 std::ostream & operator << (std::ostream &s, const Vec2<T> &v);
677 template <class T> Vec2<T> operator * (T a, const Vec2<T> &v);
686 typedef Vec2 <short> V2s;
687 typedef Vec2 <int> V2i;
688 typedef Vec2 <float> V2f;
689 typedef Vec2 <double> V2d;
707 Vec2<short>::length () const;
709 template <> const Vec2<short> &
710 Vec2<short>::normalize ();
712 template <> const Vec2<short> &
713 Vec2<short>::normalizeExc () throw (Iex::MathExc);
715 template <> const Vec2<short> &
716 Vec2<short>::normalizeNonNull ();
718 template <> Vec2<short>
719 Vec2<short>::normalized () const;
721 template <> Vec2<short>
722 Vec2<short>::normalizedExc () const throw (Iex::MathExc);
724 template <> Vec2<short>
725 Vec2<short>::normalizedNonNull () const;
731 Vec2<int>::length () const;
733 template <> const Vec2<int> &
734 Vec2<int>::normalize ();
736 template <> const Vec2<int> &
737 Vec2<int>::normalizeExc () throw (Iex::MathExc);
739 template <> const Vec2<int> &
740 Vec2<int>::normalizeNonNull ();
742 template <> Vec2<int>
743 Vec2<int>::normalized () const;
745 template <> Vec2<int>
746 Vec2<int>::normalizedExc () const throw (Iex::MathExc);
748 template <> Vec2<int>
749 Vec2<int>::normalizedNonNull () const;
853 Vec2<T>::operator [] (int i)
860 Vec2<T>::operator [] (int i) const
867 Vec2<T>::Vec2 () in Vec2() function
874 Vec2<T>::Vec2 (T a) in Vec2() function
881 Vec2<T>::Vec2 (T a, T b) in Vec2() function
889 Vec2<T>::Vec2 (const Vec2 &v) in Vec2() function
898 Vec2<T>::Vec2 (const Vec2<S> &v) in Vec2() function
905 inline const Vec2<T> &
906 Vec2<T>::operator = (const Vec2 &v)
916 Vec2<T>::setValue (S a, S b) in setValue()
925 Vec2<T>::setValue (const Vec2<S> &v) in setValue()
934 Vec2<T>::getValue (S &a, S &b) const in getValue()
943 Vec2<T>::getValue (Vec2<S> &v) const in getValue()
951 Vec2<T>::getValue() in getValue()
958 Vec2<T>::getValue() const in getValue()
966 Vec2<T>::operator == (const Vec2<S> &v) const
974 Vec2<T>::operator != (const Vec2<S> &v) const
981 Vec2<T>::equalWithAbsError (const Vec2<T> &v, T e) const in equalWithAbsError()
992 Vec2<T>::equalWithRelError (const Vec2<T> &v, T e) const in equalWithRelError()
1003 Vec2<T>::dot (const Vec2 &v) const in dot()
1010 Vec2<T>::operator ^ (const Vec2 &v) const
1017 Vec2<T>::cross (const Vec2 &v) const in cross()
1025 Vec2<T>::operator % (const Vec2 &v) const
1031 inline const Vec2<T> &
1032 Vec2<T>::operator += (const Vec2 &v)
1040 inline Vec2<T>
1041 Vec2<T>::operator + (const Vec2 &v) const
1043 return Vec2 (x + v.x, y + v.y);
1047 inline const Vec2<T> &
1048 Vec2<T>::operator -= (const Vec2 &v)
1056 inline Vec2<T>
1057 Vec2<T>::operator - (const Vec2 &v) const
1059 return Vec2 (x - v.x, y - v.y);
1063 inline Vec2<T>
1064 Vec2<T>::operator - () const
1066 return Vec2 (-x, -y);
1070 inline const Vec2<T> &
1071 Vec2<T>::negate () in negate()
1079 inline const Vec2<T> &
1080 Vec2<T>::operator *= (const Vec2 &v)
1088 inline const Vec2<T> &
1089 Vec2<T>::operator *= (T a)
1097 inline Vec2<T>
1098 Vec2<T>::operator * (const Vec2 &v) const
1100 return Vec2 (x * v.x, y * v.y);
1104 inline Vec2<T>
1105 Vec2<T>::operator * (T a) const
1107 return Vec2 (x * a, y * a);
1111 inline const Vec2<T> &
1112 Vec2<T>::operator /= (const Vec2 &v)
1120 inline const Vec2<T> &
1121 Vec2<T>::operator /= (T a)
1129 inline Vec2<T>
1130 Vec2<T>::operator / (const Vec2 &v) const
1132 return Vec2 (x / v.x, y / v.y);
1136 inline Vec2<T>
1137 Vec2<T>::operator / (T a) const
1139 return Vec2 (x / a, y / a);
1144 Vec2<T>::lengthTiny () const in lengthTiny()
1171 Vec2<T>::length () const in length()
1183 Vec2<T>::length2 () const in length2()
1189 const Vec2<T> &
1190 Vec2<T>::normalize () in normalize()
1210 const Vec2<T> &
1211 Vec2<T>::normalizeExc () throw (Iex::MathExc) in normalizeExc()
1225 const Vec2<T> &
1226 Vec2<T>::normalizeNonNull () in normalizeNonNull()
1235 Vec2<T>
1236 Vec2<T>::normalized () const in normalized()
1241 return Vec2 (T (0)); in normalized()
1243 return Vec2 (x / l, y / l); in normalized()
1247 Vec2<T>
1248 Vec2<T>::normalizedExc () const throw (Iex::MathExc) in normalizedExc()
1255 return Vec2 (x / l, y / l); in normalizedExc()
1260 Vec2<T>
1261 Vec2<T>::normalizedNonNull () const in normalizedNonNull()
1264 return Vec2 (x / l, y / l); in normalizedNonNull()
2174 operator << (std::ostream &s, const Vec2<T> &v)
2199 inline Vec2<T>
2200 operator * (T a, const Vec2<T> &v)
2202 return Vec2<T> (a * v.x, a * v.y);