cpe::p2d Class Reference

Container for 2D integer positions (pixel position) More...

List of all members.

Public Member Functions

 p2d ()
 empty constructor
 p2d (const int &x0, const int &y0)
 direct constructor
void set (const int &x, const int &y)
 set (x,y)-coordinate
const int & x () const
 get x-coordinate
int & x ()
 get x-coordinate
const int & y () const
 get y-coordinate
int & y ()
 get y-coordinate
p2doperator+= (const p2d &u)
 internal sum between two positions
p2doperator-= (const p2d &u)
 internal diff between two positions

Private Attributes

int internal_x
 internal x-coordinate
int internal_y
 internal y-coordinate

Friends

p2d operator+ (const p2d &u1, const p2d &u2)
 sum between two positions
p2d operator- (const p2d &u1, const p2d &u2)
 diff between two positions
std::ostream & operator<< (std::ostream &stream, const p2d &u)
 standard output

Detailed Description

Container for 2D integer positions (pixel position)


Constructor & Destructor Documentation

empty constructor

cpe::p2d::p2d ( const int &  x0,
const int &  y0 
)

direct constructor

Parameters:
intx0: x-coordinate
inty0: y-coordinate

Member Function Documentation

p2d & cpe::p2d::operator+= ( const p2d u)

internal sum between two positions

References internal_x, internal_y, x(), and y().

+ Here is the call graph for this function:

p2d & cpe::p2d::operator-= ( const p2d u)

internal diff between two positions

References internal_x, internal_y, x(), and y().

+ Here is the call graph for this function:

void cpe::p2d::set ( const int &  x,
const int &  y 
)

set (x,y)-coordinate

References internal_x, internal_y, x(), and y().

+ Here is the call graph for this function:

int & cpe::p2d::x ( )

get x-coordinate

References internal_x.

int & cpe::p2d::y ( )

get y-coordinate

References internal_y.


Friends And Related Function Documentation

p2d operator+ ( const p2d u1,
const p2d u2 
) [friend]

sum between two positions

p2d operator- ( const p2d u1,
const p2d u2 
) [friend]

diff between two positions

std::ostream& operator<< ( std::ostream &  stream,
const p2d u 
) [friend]

standard output


Member Data Documentation

int cpe::p2d::internal_x [private]

internal x-coordinate

Referenced by operator+=(), operator-=(), set(), and x().

int cpe::p2d::internal_y [private]

internal y-coordinate

Referenced by operator+=(), operator-=(), set(), and y().


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