#include <OSDLPoint2D.h>


Definition at line 38 of file OSDLPoint2D.h.
Public Member Functions | |
| Point2D (Coordinate x=0, Coordinate y=0) throw () | |
| Constructor of a two dimensional point, from two coordinates. | |
| Point2D (const Point2D &source) throw () | |
| Copy constructor. | |
| Point2D (const Ceylan::Maths::Linear::Bipoint &source) throw () | |
| Creates a two dimensional point from a bipoint (conversion operator). | |
| Point2D (const Ceylan::Maths::Linear::Vector2 &source) throw () | |
| Creates a two dimensional point from a 2D vector (conversion operator). | |
| virtual | ~Point2D () throw () |
| Virtual destructor of a two dimensional point. | |
| virtual void | setTo (Coordinate x, Coordinate y) throw () |
| Sets the coordinates of this point to specified coordinates. | |
| virtual void | setTo (FloatingPointCoordinate x, FloatingPointCoordinate y) throw () |
| Sets the coordinates of this point from specified floating-point coordinates. | |
| virtual void | setFrom (const Point2D &source) throw () |
| Sets this point coordinates from specified point, whose coordinates are copied. | |
| virtual void | setFrom (const Ceylan::Maths::Linear::Vector2 &source) throw () |
| Sets this point coordinates from specified 2D 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. | |
| void | translate (Offset x, Offset y) throw () |
| Translates this point of vector [x,y] : adds x to this point's abscissa, and adds y to its ordinate. | |
| virtual void | flip () throw () |
| Flips the coordinates of the point. | |
| virtual void | flipX () throw () |
| Flips the abscissa of this point. | |
| virtual void | flipY () throw () |
| Flips the oridinate 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 Point2D & | CreateFrom (FloatingPointCoordinate x=0, FloatingPointCoordinate y=0) throw () |
| Factory to create a two dimensional point from two floating-point coordinates. | |
| static void | Translate (std::list< Point2D * > &pointList, Offset x, Offset y) throw () |
| Translates all the points in the list of vector [x,y] : adds x to each point's abscissa, and adds y to each point'sordinate. | |
Static Public Attributes | |
| static const Point2D | Origin |
| The origin of a 2D referential. | |
| static const Ceylan::Maths::Linear::MatrixIndex | Dimensions = 2 |
| Tells what is the dimension of the space this point is defined in. | |
Protected Attributes | |
| Coordinate | _coord [Dimensions] |
| Coordinates of the 2D point in space (abscissa, ordinate). | |
| Point2D::Point2D | ( | Coordinate | x = 0, |
|
| Coordinate | y = 0 | |||
| ) | throw () [explicit] |
Constructor of a two dimensional point, from two coordinates.
Definition at line 16 of file OSDLPoint2D.cc.
| Point2D::Point2D | ( | const Point2D & | source | ) | throw () |
Copy constructor.
Definition at line 25 of file OSDLPoint2D.cc.
| Point2D::Point2D | ( | const Ceylan::Maths::Linear::Bipoint & | source | ) | throw () [explicit] |
Creates a two dimensional point from a bipoint (conversion operator).
Definition at line 35 of file OSDLPoint2D.cc.
| Point2D::Point2D | ( | const Ceylan::Maths::Linear::Vector2 & | source | ) | throw () [explicit] |
Creates a two dimensional point from a 2D vector (conversion operator).
Definition at line 44 of file OSDLPoint2D.cc.
| Point2D::~Point2D | ( | ) | throw () [virtual] |
| Point2D & Point2D::CreateFrom | ( | FloatingPointCoordinate | x = 0, |
|
| FloatingPointCoordinate | y = 0 | |||
| ) | throw () [static] |
Factory to create a two dimensional point from two floating-point coordinates.
Floating-point coordinates are rounded to nearest integer coordinates.
| x | the point abscissa. | |
| y | the point ordinate. |
Definition at line 54 of file OSDLPoint2D.cc.
| void Point2D::setTo | ( | Coordinate | x, | |
| Coordinate | y | |||
| ) | throw () [virtual] |
Sets the coordinates of this point to specified coordinates.
Definition at line 69 of file OSDLPoint2D.cc.
References _coord.
| void Point2D::setTo | ( | FloatingPointCoordinate | x, | |
| FloatingPointCoordinate | y | |||
| ) | throw () [virtual] |
Sets the coordinates of this point from specified floating-point coordinates.
Definition at line 78 of file OSDLPoint2D.cc.
References _coord.
| void Point2D::setFrom | ( | const Point2D & | source | ) | throw () [virtual] |
Sets this point coordinates from specified point, whose coordinates are copied.
Definition at line 89 of file OSDLPoint2D.cc.
References _coord.
| void Point2D::setFrom | ( | const Ceylan::Maths::Linear::Vector2 & | source | ) | throw () [virtual] |
Sets this point coordinates from specified 2D vector, whose coordinates are copied.
Definition at line 98 of file OSDLPoint2D.cc.
References _coord.
| Coordinate OSDL::Video::TwoDimensional::Point2D::getX | ( | ) | const throw () [inline] |
Returns the first coordinate (abscissa) of the point.
Definition at line 260 of file OSDLPoint2D.h.
References _coord.
| void OSDL::Video::TwoDimensional::Point2D::setX | ( | Coordinate | newX | ) | throw () [inline] |
Sets the first coordinate (abscissa) of the point.
Definition at line 268 of file OSDLPoint2D.h.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
| Coordinate OSDL::Video::TwoDimensional::Point2D::getY | ( | ) | const throw () [inline] |
Returns the second coordinate (ordinate) of the point.
Definition at line 276 of file OSDLPoint2D.h.
References _coord.
| void OSDL::Video::TwoDimensional::Point2D::setY | ( | Coordinate | newY | ) | throw () [inline] |
Sets the second coordinate (ordinate) of the point.
Definition at line 284 of file OSDLPoint2D.h.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
Translates this point of vector [x,y] : adds x to this point's abscissa, and adds y to its ordinate.
Definition at line 119 of file OSDLPoint2D.cc.
References _coord.
| void Point2D::flip | ( | ) | throw () [virtual] |
Flips the coordinates of the point.
Implements OSDL::Video::TwoDimensional::Point.
Definition at line 128 of file OSDLPoint2D.cc.
References _coord.
| void Point2D::flipX | ( | ) | throw () [virtual] |
| void Point2D::flipY | ( | ) | throw () [virtual] |
Flips the oridinate of this point.
Definition at line 145 of file OSDLPoint2D.cc.
References _coord.
| const string Point2D::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const throw () [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 107 of file OSDLPoint2D.cc.
References _coord.
Referenced by operator<<(), and OSDL::Video::TwoDimensional::Widget::toString().
| static void OSDL::Video::TwoDimensional::Point2D::Translate | ( | std::list< Point2D * > & | pointList, | |
| Offset | x, | |||
| Offset | y | |||
| ) | throw () [static] |
Translates all the points in the list of vector [x,y] : adds x to each point's abscissa, and adds y to each point'sordinate.
const Point2D Point2D::Origin [static] |
const Ceylan::Maths::Linear::MatrixIndex OSDL::Video::TwoDimensional::Point2D::Dimensions = 2 [static] |
Tells what is the dimension of the space this point is defined in.
Reimplemented from OSDL::Video::TwoDimensional::Point.
Definition at line 237 of file OSDLPoint2D.h.
Coordinates of the 2D point in space (abscissa, ordinate).
Definition at line 249 of file OSDLPoint2D.h.
Referenced by flip(), flipX(), flipY(), getX(), getY(), setFrom(), setTo(), toString(), and translate().
1.5.5