Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Coord Class Reference

#include <coord.h>

List of all members.


Detailed Description

2D integer coordinate data

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 Coord ()
 Coord (int iX, int iY)
void Set (int iX, int iY)
Coord operator+ (const Coord &rkCoord) const
Coord operator- (const Coord &rkCoord) const
Coord operator * (float fScale) const
Coordoperator+= (const Coord &rkCoord)
Coordoperator-= (const Coord &rkCoord)
Coordoperator *= (float fScale)
Coord operator- () const
bool operator== (const Coord &rkCoord) const
bool operator!= (const Coord &rkCoord) const

Public Attributes

int x
int y


Constructor & Destructor Documentation

Coord  )  [inline]
 

Reset to 0

Coord int  iX,
int  iY
[inline]
 

Parameters:
iX X coord
iY Y coord


Member Function Documentation

void Set int  iX,
int  iY
[inline]
 

Set components

Parameters:
iX X coord
iY Y coord

Coord operator+ const Coord rkCoord  )  const [inline]
 

Add two coords

Parameters:
rkCoord Coordinate to add with
Returns:
Coordinate that is sum of arguments

Coord operator- const Coord rkCoord  )  const [inline]
 

Subract two coords

Parameters:
rkCoord Coordinate to subtract with
Returns:
Coordinate that is difference of arguments

Coord operator * float  fScale  )  const [inline]
 

Scale coord

Parameters:
fScale Scale factor
Returns:
Scaled coordinate

Coord& operator+= const Coord rkCoord  )  [inline]
 

Add two coords and store

Parameters:
rkCoord Coordinate to add with
Returns:
Coordinate that is sum of arguments (this)

Coord& operator-= const Coord rkCoord  )  [inline]
 

Subtract two coords and store

Parameters:
rkCoord Coordinate to subtract with
Returns:
Coordinate that is difference of arguments (this)

Coord& operator *= float  fScale  )  [inline]
 

Scale coord

Parameters:
fScale Scale factor
Returns:
Scaled coordinate (this)

Coord operator-  )  const [inline]
 

Negate coord

Returns:
Negated coordinate

bool operator== const Coord rkCoord  )  const [inline]
 

Compare two coords

Parameters:
rkCoord Coordinate to compare with
Returns:
true if equal, false if not

bool operator!= const Coord rkCoord  )  const [inline]
 

Compare two coords

Parameters:
rkCoord Coordinate to compare with
Returns:
false if equal, true if not


Member Data Documentation

int x
 

X coordinate

int y
 

Y coordinate


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:20 2004 for NeoWTK by doxygen 1.3.5