Public Member Functions

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< 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

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.


Member Function Documentation

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

Return length

Definition at line 117 of file point.h.

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

Equality comparision

Definition at line 111 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 93 of file point.h.

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

Vector addition

Definition at line 65 of file point.h.

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

Vector inplace addition

Definition at line 77 of file point.h.

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

Vector substraction

Definition at line 71 of file point.h.

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

Vector inplace substraction

Definition at line 85 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 99 of file point.h.

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

Equality comparision

Definition at line 105 of file point.h.


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