FIFE::PointType2D< T > Class Template Reference

#include <point.h>

Inheritance diagram for FIFE::PointType2D< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PointType2D (T _x=0, T _y=0)
 PointType2D (const PointType2D< T > &rhs)
PointType2D< T > operator+ (const PointType2D< T > &p) const
PointType2D< T > operator- (const PointType2D< T > &p) const
PointType2D< T > & operator+= (const PointType2D< T > &p)
PointType2D< T > & operator-= (const PointType2D< T > &p)
PointType2D< T > operator* (const T &i) const
PointType2D< T > operator/ (const T &i) const
bool operator== (const PointType2D< T > &p) const
bool operator!= (const PointType2D< T > &p) const
length () const
void normalize ()
void rotate (T angle)
void rotate (const PointType2D< T > &origin, T angle)

Detailed Description

template<typename T>
class FIFE::PointType2D< T >

A 2D Point

This is a small helper class to aid in 2d vector arithmetics.

See also:
Rect

Definition at line 47 of file point.h.


Constructor & Destructor Documentation

template<typename T>
FIFE::PointType2D< T >::PointType2D ( _x = 0,
_y = 0 
) [inline, explicit]

Constructor

Creates a with 0 as default values.

Definition at line 60 of file point.h.

template<typename T>
FIFE::PointType2D< T >::PointType2D ( const PointType2D< T > &  rhs  )  [inline]

Copy Constructor

Definition at line 65 of file point.h.


Member Function Documentation

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

Return length

Definition at line 122 of file point.h.

Referenced by FIFE::PointType2D< int >::normalize().

Here is the caller graph for this function:

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

Normalizes the point

Definition at line 130 of file point.h.

template<typename T>
bool FIFE::PointType2D< T >::operator!= ( const PointType2D< T > &  p  )  const [inline]

Equality comparision

Definition at line 116 of file point.h.

template<typename T>
PointType2D<T> FIFE::PointType2D< T >::operator* ( const T &  i  )  const [inline]

Scalar multiplication with an integer value

Definition at line 98 of file point.h.

template<typename T>
PointType2D<T> FIFE::PointType2D< T >::operator+ ( const PointType2D< T > &  p  )  const [inline]

Vector addition

Definition at line 70 of file point.h.

template<typename T>
PointType2D<T>& FIFE::PointType2D< T >::operator+= ( const PointType2D< T > &  p  )  [inline]

Vector inplace addition

Definition at line 82 of file point.h.

template<typename T>
PointType2D<T> FIFE::PointType2D< T >::operator- ( const PointType2D< T > &  p  )  const [inline]

Vector substraction

Definition at line 76 of file point.h.

template<typename T>
PointType2D<T>& FIFE::PointType2D< T >::operator-= ( const PointType2D< T > &  p  )  [inline]

Vector inplace substraction

Definition at line 90 of file point.h.

template<typename T>
PointType2D<T> FIFE::PointType2D< T >::operator/ ( const T &  i  )  const [inline]

Scalar division with an integer value

Definition at line 104 of file point.h.

template<typename T>
bool FIFE::PointType2D< T >::operator== ( const PointType2D< T > &  p  )  const [inline]

Equality comparision

Definition at line 110 of file point.h.

template<typename T>
void FIFE::PointType2D< T >::rotate ( const PointType2D< T > &  origin,
angle 
) [inline]

Rotates the point around an origin

Definition at line 161 of file point.h.

template<typename T>
void FIFE::PointType2D< T >::rotate ( angle  )  [inline]

Rotates the point around the origin

Definition at line 146 of file point.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 23 13:05:06 2011 for FIFE by  doxygen 1.6.3