Represents a point whose coordinates are integers, in a three-dimensional space. More...
#include <OSDLPoint3D.h>
Public Member Functions | |
Point3D (Coordinate x, Coordinate y, Coordinate z) | |
Constructor of a three dimensional point, from three coordinates. | |
Point3D (const Point3D &source) | |
Copy constructor. | |
Point3D (const Ceylan::Maths::Linear::Vector3 &source) | |
Creates a two dimensional point from a 2D vector (conversion operator). | |
Point3D (FloatingPointCoordinate x, FloatingPointCoordinate y, FloatingPointCoordinate z) | |
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) |
Sets this point coordinates from specified point, whose coordinates are copied. | |
virtual void | setFrom (const Ceylan::Maths::Linear::Vector3 &source) |
Sets this point coordinates from specified 3D vector, whose coordinates are copied. | |
Coordinate | getX () const |
Returns the first coordinate (abscissa) of the point. | |
void | setX (Coordinate newX) |
Sets the first coordinate (abscissa) of the point. | |
Coordinate | getY () const |
Returns the second coordinate (ordinate) of the point. | |
void | setY (Coordinate newY) |
Sets the second coordinate (ordinate) of the point. | |
Coordinate | getZ () const |
Returns the third coordinate (depth) of the point. | |
void | setZ (Coordinate newY) |
Sets the third coordinate (depth) of the point. | |
void | translate (Offset x, Offset y, Offset z) |
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 () |
Flips the coordinates of the point. | |
void | flipX () |
Flips the abscissa of this point. | |
void | flipY () |
Flips the ordinate of this point. | |
void | flipZ () |
Flips the depth coordinate of this point. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
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) |
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). |
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 71 of file OSDLPoint3D.h.
Point3D::Point3D | ( | Coordinate | x, | |
Coordinate | y, | |||
Coordinate | z | |||
) |
Constructor of a three dimensional point, from three coordinates.
Definition at line 43 of file OSDLPoint3D.cc.
References _coord.
Point3D::Point3D | ( | const Point3D & | source | ) |
Copy constructor.
Definition at line 54 of file OSDLPoint3D.cc.
References _coord.
Point3D::Point3D | ( | const Ceylan::Maths::Linear::Vector3 & | source | ) | [explicit] |
Creates a two dimensional point from a 2D vector (conversion operator).
Definition at line 66 of file OSDLPoint3D.cc.
References _coord.
Point3D::Point3D | ( | FloatingPointCoordinate | x, | |
FloatingPointCoordinate | y, | |||
FloatingPointCoordinate | z | |||
) |
Constructor of a three dimensional point from three floating-point coordinates.
Definition at line 77 of file OSDLPoint3D.cc.
References _coord.
Point3D::~Point3D | ( | ) | throw () [virtual] |
Virtual destructor of a three dimensional point.
Definition at line 89 of file OSDLPoint3D.cc.
void Point3D::flip | ( | ) | [virtual] |
Flips the coordinates of the point.
Implements OSDL::Video::TwoDimensional::Point.
Definition at line 144 of file OSDLPoint3D.cc.
References _coord.
void Point3D::flipX | ( | ) |
void Point3D::flipY | ( | ) |
void Point3D::flipZ | ( | ) |
Flips the depth coordinate of this point.
Definition at line 173 of file OSDLPoint3D.cc.
References _coord.
Coordinate OSDL::Video::TwoDimensional::Point3D::getX | ( | ) | const [inline] |
Returns the first coordinate (abscissa) of the point.
Definition at line 282 of file OSDLPoint3D.h.
References _coord.
Coordinate OSDL::Video::TwoDimensional::Point3D::getY | ( | ) | const [inline] |
Returns the second coordinate (ordinate) of the point.
Definition at line 301 of file OSDLPoint3D.h.
References _coord.
Coordinate OSDL::Video::TwoDimensional::Point3D::getZ | ( | ) | const [inline] |
Returns the third coordinate (depth) of the point.
Definition at line 318 of file OSDLPoint3D.h.
References _coord.
void Point3D::setFrom | ( | const Ceylan::Maths::Linear::Vector3 & | source | ) | [virtual] |
Sets this point coordinates from specified 3D vector, whose coordinates are copied.
Definition at line 107 of file OSDLPoint3D.cc.
References _coord.
void Point3D::setFrom | ( | const Point3D & | source | ) | [virtual] |
Sets this point coordinates from specified point, whose coordinates are copied.
Definition at line 96 of file OSDLPoint3D.cc.
References _coord.
void OSDL::Video::TwoDimensional::Point3D::setX | ( | Coordinate | newX | ) | [inline] |
Sets the first coordinate (abscissa) of the point.
Definition at line 291 of file OSDLPoint3D.h.
References _coord.
void OSDL::Video::TwoDimensional::Point3D::setY | ( | Coordinate | newY | ) | [inline] |
Sets the second coordinate (ordinate) of the point.
Definition at line 310 of file OSDLPoint3D.h.
References _coord.
void OSDL::Video::TwoDimensional::Point3D::setZ | ( | Coordinate | newY | ) | [inline] |
Sets the third coordinate (depth) of the point.
Definition at line 327 of file OSDLPoint3D.h.
References _coord.
const string Point3D::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from OSDL::Video::TwoDimensional::Point.
Definition at line 118 of file OSDLPoint3D.cc.
References _coord.
Referenced by operator<<().
void Point3D::Translate | ( | std::list< Point3D * > & | pointList, | |
Offset | x, | |||
Offset | y, | |||
Offset | z | |||
) | [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.
Definition at line 182 of file OSDLPoint3D.cc.
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 133 of file OSDLPoint3D.cc.
References _coord.
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 255 of file OSDLPoint3D.h.
const Point3D Point3D::Origin [static] |
The origin of a 3D referential.
Definition at line 234 of file OSDLPoint3D.h.