Public Member Functions | Public Attributes

Vector2< T > Struct Template Reference

#include <vector2.h>

List of all members.

Public Member Functions

 Vector2 ()
 Vector2 (const T x0, const T y0)
void operator() (const T x0, const T y0)
bool operator== (const Vector2< T > &v)
bool operator!= (const Vector2< T > &v)
Vector2< T > operator- (void) const
Vector2< T > operator+ (const Vector2< T > &v) const
Vector2< T > operator- (const Vector2< T > &v) const
Vector2< T > operator* (const T num) const
Vector2< T > operator/ (const T num) const
Vector2< T > & operator+= (const Vector2< T > &v)
Vector2< T > & operator-= (const Vector2< T > &v)
Vector2< T > & operator*= (const T num)
Vector2< T > & operator/= (const T num)
operator* (const Vector2< T > &v) const
length_squared () const
length () const
void normalize ()
Vector2< T > normalized () const
void reflect (const Vector2< T > &n)
void project (const Vector2< T > &v)
Vector2< T > projected (const Vector2< T > &v)
angle (const Vector2< T > &v1, const Vector2< T > &v2)
angle_normalized (const Vector2< T > &v1, const Vector2< T > &v2)

Public Attributes

x
y

Detailed Description

template<typename T>
struct Vector2< T >

Definition at line 29 of file vector2.h.


Constructor & Destructor Documentation

template<typename T>
Vector2< T >::Vector2 (  )  [inline]
template<typename T>
Vector2< T >::Vector2 ( const T  x0,
const T  y0 
) [inline]

Member Function Documentation

template<typename T>
T Vector2< T >::angle ( const Vector2< T > &  v1,
const Vector2< T > &  v2 
) [inline]

Definition at line 142 of file vector2.h.

template<typename T>
T Vector2< T >::angle_normalized ( const Vector2< T > &  v1,
const Vector2< T > &  v2 
) [inline]

Definition at line 146 of file vector2.h.

template<typename T>
T Vector2< T >::length (  )  const [inline]

Definition at line 114 of file vector2.h.

template<typename T>
T Vector2< T >::length_squared (  )  const [inline]

Definition at line 110 of file vector2.h.

template<typename T>
void Vector2< T >::normalize ( void   )  [inline]

Definition at line 118 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::normalized (  )  const [inline]

Definition at line 122 of file vector2.h.

template<typename T>
bool Vector2< T >::operator!= ( const Vector2< T > &  v  )  [inline]

Definition at line 48 of file vector2.h.

template<typename T>
void Vector2< T >::operator() ( const T  x0,
const T  y0 
) [inline]

Definition at line 40 of file vector2.h.

template<typename T>
T Vector2< T >::operator* ( const Vector2< T > &  v  )  const [inline]

Definition at line 106 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::operator* ( const T  num  )  const [inline]

Definition at line 64 of file vector2.h.

template<typename T>
Vector2<T>& Vector2< T >::operator*= ( const T  num  )  [inline]

Definition at line 92 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::operator+ ( const Vector2< T > &  v  )  const [inline]

Definition at line 56 of file vector2.h.

template<typename T>
Vector2<T>& Vector2< T >::operator+= ( const Vector2< T > &  v  )  [inline]

Definition at line 78 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::operator- ( void   )  const [inline]

Definition at line 52 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::operator- ( const Vector2< T > &  v  )  const [inline]

Definition at line 60 of file vector2.h.

template<typename T>
Vector2<T>& Vector2< T >::operator-= ( const Vector2< T > &  v  )  [inline]

Definition at line 85 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::operator/ ( const T  num  )  const [inline]

Definition at line 71 of file vector2.h.

template<typename T>
Vector2<T>& Vector2< T >::operator/= ( const T  num  )  [inline]

Definition at line 99 of file vector2.h.

template<typename T>
bool Vector2< T >::operator== ( const Vector2< T > &  v  )  [inline]

Definition at line 44 of file vector2.h.

template<typename T>
void Vector2< T >::project ( const Vector2< T > &  v  )  [inline]

Definition at line 134 of file vector2.h.

template<typename T>
Vector2<T> Vector2< T >::projected ( const Vector2< T > &  v  )  [inline]

Definition at line 138 of file vector2.h.

template<typename T>
void Vector2< T >::reflect ( const Vector2< T > &  n  )  [inline]

Definition at line 126 of file vector2.h.


Member Data Documentation

template<typename T>
T Vector2< T >::x

Definition at line 31 of file vector2.h.

template<typename T>
T Vector2< T >::y

Definition at line 31 of file vector2.h.


The documentation for this struct was generated from the following file: