GG::Pt Struct Reference

a GG screen coordinate class More...

#include <PtRect.h>

List of all members.

Structors

 Pt ()
 Pt (int x_, int y_)

Accessors

bool Less (const Pt &rhs) const

Mutators

void operator+= (const Pt &rhs)
void operator-= (const Pt &rhs)
Pt operator- () const

Public Attributes

int x
int y


Detailed Description

a GG screen coordinate class

Definition at line 43 of file PtRect.h.


Constructor & Destructor Documentation

GG::Pt::Pt (  ) 

default ctor

GG::Pt::Pt ( int  x_,
int  y_ 
)

ctor that creates a Pt ( _x , y )


Member Function Documentation

bool GG::Pt::Less ( const Pt rhs  )  const [inline]

returns true if x < rhs.x or returns true if x == rhs.x and y <rhs.y.

This is useful for sorting Pts in STL containers and algorithms

Definition at line 53 of file PtRect.h.

References x, and y.

void GG::Pt::operator+= ( const Pt rhs  )  [inline]

adds rhs to Pt

Definition at line 57 of file PtRect.h.

References x, and y.

void GG::Pt::operator-= ( const Pt rhs  )  [inline]

subtracts rhs to Pt

Definition at line 58 of file PtRect.h.

References x, and y.

Pt GG::Pt::operator- (  )  const [inline]

negates Pt

Definition at line 59 of file PtRect.h.


Member Data Documentation

int GG::Pt::x

the x component

Definition at line 62 of file PtRect.h.

Referenced by Less(), GG::Spin< T >::MinUsableSize(), GG::operator+(), operator+=(), GG::operator-(), operator-=(), GG::operator<(), GG::operator<=(), GG::operator==(), GG::operator>(), GG::operator>=(), and GG::Spin< T >::Render().

int GG::Pt::y

the y component

Definition at line 63 of file PtRect.h.

Referenced by Less(), GG::Spin< T >::MinUsableSize(), GG::operator+(), operator+=(), GG::operator-(), operator-=(), GG::operator<(), GG::operator<=(), GG::operator==(), GG::operator>(), GG::operator>=(), and GG::Spin< T >::Render().


The documentation for this struct was generated from the following file:
Generated on Wed Mar 26 14:35:42 2008 for GG by  doxygen 1.5.2