Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::graphics::Point< T > Class Template Reference

#include <Point.h>

Inheritance diagram for prapi::graphics::Point< T >:

Object prapi::graphics::Dimension< T > List of all members.

Detailed Description

template<class T>
class prapi::graphics::Point< T >

A class for storing 2D coordinates.

This is mainly a convenience class for bundling two integer values into an easily-accessible package.


Public Methods

 Point (T xOrigin=0, T yOrigin=0)
 Initialize a point with the given coordinates.

 Point (const Point &other)
 Copy a point.

Point & operator= (const Point &other)
 Make a copy of a point.

Point & operator *= (const Point &other)
 Multiply two points coordinate-by-coordinate.

Point & operator/= (const Point &other)
 Divide two points coordinate-by-coordinate.

Point & operator+= (const Point &other)
 Add coordinates to this point.

Point & operator-= (const Point &other)
 Subtract coordinates from this point.

Point & operator *= (T value)
 Multiply coordinates by a value.

Point & operator/= (T value)
 Divide coordinates by a value.

Point & operator+= (T value)
 Add a value to both coordinates.

Point & operator-= (T value)
 Subtract a value from both coordinates.


Public Attributes

x
 The x coordinate.

y
 The y coordinate.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.