Pixel Dust Game Engine  v0.9.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Public Attributes | List of all members
OffsetT Class Reference
Collaboration diagram for OffsetT:
Collaboration graph
[legend]

Public Member Functions

bool operator== (const OffsetT< T > &p2) const
 return true if this point is equal to the other
 
bool operator!= (const OffsetT< T > &p2) const
 return true if this point is not equal to the other
 
OffsetT< T > & operator= (const OffsetT< T > &p2)
 set point equal to another
 
OffsetT< T > operator+ (const OffsetT< T > &p2) const
 add two points together by adding x & y coordinates
 
OffsetT< T > operator- (const OffsetT< T > &p2) const
 subtract a point from another by subtracting x & y coordinates
 
OffsetT< T > & operator+= (const OffsetT< T > &p2)
 add another point to this one by adding x & y coordinates
 
OffsetT< T > & operator-= (const OffsetT< T > &p2)
 subtract another point from this one by subtracting x & y coordinates
 
OffsetT< T > & operator*= (float n)
 scale the offset
 
OffsetT< T > & operator/= (float n)
 scale the offset
 
OffsetT< T > operator* (float n) const
 scale an offset from by a factor
 
OffsetT< T > operator/ (float n) const
 scale an offset from by a factor
 
bool zero () const
 see if it's (0,0)
 
 OffsetT (T ix, T iy)
 create a point and set its x & y values
 
 OffsetT ()
 create a point at the origin (0,0)
 

Public Attributes

x
 x coordinate of point on a grid or screen
 
y
 y coordinate of point on a grid or screen
 

Detailed Description

Point for 2D coordinate system. Point is a provides support for dealing with points as x, y floating point values in 2 dimensional space.

Constructor & Destructor Documentation

OffsetT ( ix,
iy 
)
inline

create a point and set its x & y values

OffsetT ( )
inline

create a point at the origin (0,0)

Member Function Documentation

bool operator!= ( const OffsetT< T > &  p2) const

return true if this point is not equal to the other

OffsetT<T> operator* ( float  n) const

scale an offset from by a factor

OffsetT<T>& operator*= ( float  n)

scale the offset

OffsetT<T> operator+ ( const OffsetT< T > &  p2) const

add two points together by adding x & y coordinates

OffsetT<T>& operator+= ( const OffsetT< T > &  p2)

add another point to this one by adding x & y coordinates

OffsetT<T> operator- ( const OffsetT< T > &  p2) const

subtract a point from another by subtracting x & y coordinates

OffsetT<T>& operator-= ( const OffsetT< T > &  p2)

subtract another point from this one by subtracting x & y coordinates

OffsetT<T> operator/ ( float  n) const

scale an offset from by a factor

OffsetT<T>& operator/= ( float  n)

scale the offset

OffsetT<T>& operator= ( const OffsetT< T > &  p2)

set point equal to another

bool operator== ( const OffsetT< T > &  p2) const

return true if this point is equal to the other

bool zero ( ) const

see if it's (0,0)

Member Data Documentation

T x

x coordinate of point on a grid or screen

T y

y coordinate of point on a grid or screen