OSDL::Video::TwoDimensional::Point3D Class Reference

#include <OSDLPoint3D.h>

Inheritance diagram for OSDL::Video::TwoDimensional::Point3D:

[legend]
Collaboration diagram for OSDL::Video::TwoDimensional::Point3D:
[legend]
List of all members.

Detailed Description

Represents a point whose coordinates are integers, in a three-dimensional space.

This kind of points belongs to the 2D namespace, even if they are 3D, since stacking or homogeneous matrices are useful in a 2D context.

These integer points are especially useful to handle graphical user interface elements that can be stacked, such as widgets.

Definition at line 42 of file OSDLPoint3D.h.

Public Member Functions

 Point3D (Coordinate x, Coordinate y, Coordinate z) throw ()
 Constructor of a three dimensional point, from three coordinates.
 Point3D (const Point3D &source) throw ()
 Copy constructor.
 Point3D (const Ceylan::Maths::Linear::Vector3 &source) throw ()
 Creates a two dimensional point from a 2D vector (conversion operator).
 Point3D (FloatingPointCoordinate x, FloatingPointCoordinate y, FloatingPointCoordinate z) throw ()
 Constructor of a three dimensional point from three floating-point coordinates.
virtual ~Point3D () throw ()
 Virtual destructor of a three dimensional point.
virtual void setFrom (const Point3D &source) throw ()
 Sets this point coordinates from specified point, whose coordinates are copied.
virtual void setFrom (const Ceylan::Maths::Linear::Vector3 &source) throw ()
 Sets this point coordinates from specified 3D vector, whose coordinates are copied.
Coordinate getX () const throw ()
 Returns the first coordinate (abscissa) of the point.
void setX (Coordinate newX) throw ()
 Sets the first coordinate (abscissa) of the point.
Coordinate getY () const throw ()
 Returns the second coordinate (ordinate) of the point.
void setY (Coordinate newY) throw ()
 Sets the second coordinate (ordinate) of the point.
Coordinate getZ () const throw ()
 Returns the third coordinate (depth) of the point.
void setZ (Coordinate newY) throw ()
 Sets the third coordinate (depth) of the point.
void translate (Offset x, Offset y, Offset z) throw ()
 Translates this point of vector [x,y,z] : adds x to this point's abscissa, adds y to its ordinate, and z to the depth coordinate.
virtual void flip () throw ()
 Flips the coordinates of the point.
void flipX () throw ()
 Flips the abscissa of this point.
void flipY () throw ()
 Flips the ordinate of this point.
void flipZ () throw ()
 Flips the depth coordinate of this point.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw ()
 Returns an user-friendly description of the state of this object.

Static Public Member Functions

static void Translate (std::list< Point3D * > &pointList, Offset x, Offset y, Offset z) throw ()
 Translates all the points in the list of vector [x,y,z] : adds x to each point's abscissa, adds y to their ordinates, and z to their depth coordinates.

Static Public Attributes

static const Point3D Origin
 The origin of a 3D referential.
static const Ceylan::Maths::Linear::MatrixIndex Dimensions = 3
 Tells what is the dimension of the space this point is defined in.

Protected Attributes

Coordinate _coord [Dimensions]
 Coordinates of the 3D point in space (abscissa, ordinate, depth coordinate).


Constructor & Destructor Documentation

Point3D::Point3D ( Coordinate  x,
Coordinate  y,
Coordinate  z 
) throw ()

Constructor of a three dimensional point, from three coordinates.

Definition at line 16 of file OSDLPoint3D.cc.

Point3D::Point3D ( const Point3D source  )  throw ()

Copy constructor.

Note:
Cannot use the 'explicit' qualifier since it would prohibit expressions such as : 'return Point3D( _coord[0], _coord[1], _coord[2] ) ;'

Definition at line 26 of file OSDLPoint3D.cc.

Point3D::Point3D ( const Ceylan::Maths::Linear::Vector3 &  source  )  throw () [explicit]

Creates a two dimensional point from a 2D vector (conversion operator).

Note:
Floating-point coordinates are rounded to nearest integers.

Definition at line 37 of file OSDLPoint3D.cc.

Point3D::Point3D ( FloatingPointCoordinate  x,
FloatingPointCoordinate  y,
FloatingPointCoordinate  z 
) throw ()

Constructor of a three dimensional point from three floating-point coordinates.

Note:
Floating-point coordinates are rounded to nearest integers.

Definition at line 47 of file OSDLPoint3D.cc.

Point3D::~Point3D (  )  throw () [virtual]

Virtual destructor of a three dimensional point.

Definition at line 58 of file OSDLPoint3D.cc.


Member Function Documentation

void Point3D::setFrom ( const Point3D source  )  throw () [virtual]

Sets this point coordinates from specified point, whose coordinates are copied.

Definition at line 64 of file OSDLPoint3D.cc.

void Point3D::setFrom ( const Ceylan::Maths::Linear::Vector3 &  source  )  throw () [virtual]

Sets this point coordinates from specified 3D vector, whose coordinates are copied.

Note:
Floating-point coordinates are rounded to nearest integers.

Definition at line 74 of file OSDLPoint3D.cc.

Coordinate OSDL::Video::TwoDimensional::Point3D::getX (  )  const throw () [inline]

Returns the first coordinate (abscissa) of the point.

Definition at line 231 of file OSDLPoint3D.h.

References _coord.

void OSDL::Video::TwoDimensional::Point3D::setX ( Coordinate  newX  )  throw () [inline]

Sets the first coordinate (abscissa) of the point.

Definition at line 239 of file OSDLPoint3D.h.

Coordinate OSDL::Video::TwoDimensional::Point3D::getY (  )  const throw () [inline]

Returns the second coordinate (ordinate) of the point.

Definition at line 248 of file OSDLPoint3D.h.

References _coord.

void OSDL::Video::TwoDimensional::Point3D::setY ( Coordinate  newY  )  throw () [inline]

Sets the second coordinate (ordinate) of the point.

Definition at line 256 of file OSDLPoint3D.h.

Coordinate OSDL::Video::TwoDimensional::Point3D::getZ (  )  const throw () [inline]

Returns the third coordinate (depth) of the point.

Definition at line 263 of file OSDLPoint3D.h.

References _coord.

void OSDL::Video::TwoDimensional::Point3D::setZ ( Coordinate  newY  )  throw () [inline]

Sets the third coordinate (depth) of the point.

Definition at line 271 of file OSDLPoint3D.h.

void Point3D::translate ( Offset  x,
Offset  y,
Offset  z 
) throw ()

Translates this point of vector [x,y,z] : adds x to this point's abscissa, adds y to its ordinate, and z to the depth coordinate.

Definition at line 98 of file OSDLPoint3D.cc.

void Point3D::flip (  )  throw () [virtual]

Flips the coordinates of the point.

Implements OSDL::Video::TwoDimensional::Point.

Definition at line 108 of file OSDLPoint3D.cc.

References _coord.

void Point3D::flipX (  )  throw ()

Flips the abscissa of this point.

Definition at line 118 of file OSDLPoint3D.cc.

References _coord.

void Point3D::flipY (  )  throw ()

Flips the ordinate of this point.

Definition at line 126 of file OSDLPoint3D.cc.

References _coord.

void Point3D::flipZ (  )  throw ()

Flips the depth coordinate of this point.

Definition at line 134 of file OSDLPoint3D.cc.

References _coord.

const string Point3D::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const throw () [virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Reimplemented from OSDL::Video::TwoDimensional::Point.

Definition at line 84 of file OSDLPoint3D.cc.

static void OSDL::Video::TwoDimensional::Point3D::Translate ( std::list< Point3D * > &  pointList,
Offset  x,
Offset  y,
Offset  z 
) throw () [static]

Translates all the points in the list of vector [x,y,z] : adds x to each point's abscissa, adds y to their ordinates, and z to their depth coordinates.


Member Data Documentation

const Point3D Point3D::Origin [static]

The origin of a 3D referential.

Definition at line 190 of file OSDLPoint3D.h.

const Ceylan::Maths::Linear::MatrixIndex OSDL::Video::TwoDimensional::Point3D::Dimensions = 3 [static]

Tells what is the dimension of the space this point is defined in.

Reimplemented from OSDL::Video::TwoDimensional::Point.

Definition at line 209 of file OSDLPoint3D.h.

Coordinate OSDL::Video::TwoDimensional::Point3D::_coord[Dimensions] [protected]

Coordinates of the 3D point in space (abscissa, ordinate, depth coordinate).

Definition at line 221 of file OSDLPoint3D.h.

Referenced by flip(), flipX(), flipY(), flipZ(), getX(), getY(), and getZ().


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 14:47:34 2007 for OSDL by  doxygen 1.5.1