Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members  

PLMPoint Class Reference

A simple 2D point (position), with 16 bits integer coordinates. More...

#include <PLMMath.hpp>

List of all members.

Public Methods

 PLMPoint ()
 PLMPoint (s16 x, s16 y)
 PLMPoint (const PLMPoint &p)
void Move (s16 x, s16 y)
void Move (const PLMPoint &p)
void RelMove (s16 dx, s16 dy)
const PLMPoint operator+ (const PLMPoint &p) const

Public Attributes

s16 x
s16 y

Friends

PLMDLL ostream & operator<< (ostream &os, const PLMPoint &p)


Detailed Description

A simple 2D point (position), with 16 bits integer coordinates.


Constructor & Destructor Documentation

PLMPoint::PLMPoint   [inline]
 

Init to (0,0).

PLMPoint::PLMPoint s16    x,
s16    y
[inline]
 

Create a point (x, y).

PLMPoint::PLMPoint const PLMPoint &    p [inline]
 

Create a copy of p.


Member Function Documentation

void PLMPoint::Move s16    x,
s16    y
[inline]
 

Change position to (x, y).

void PLMPoint::Move const PLMPoint &    p [inline]
 

Change position to p.

void PLMPoint::RelMove s16    dx,
s16    dy
[inline]
 

Add dx and dy values to current x and y position respectively.

const PLMPoint PLMPoint::operator+ const PLMPoint &    p const [inline]
 

+ operator, get a new point (this + p).


Friends And Related Function Documentation

PLMDLL ostream& operator<< ostream &    os,
const PLMPoint &    p
[friend]
 

Print current p position to out-stream os.


Member Data Documentation

s16 PLMPoint::x
 

X coordinate.

s16 PLMPoint::y
 

Y coordinate.


The documentation for this class was generated from the following file:
  • PLMMath.hpp

Generated by Doxygen 1.2.18 on Tue Oct 26 12:07:44 2004.