This classes defines a rectangle whose sides are parallel or orthogonal to the screen's sides, according to OpenGL conventions. More...
#include <OSDLGLUprightRectangle.h>
Public Member Functions | |
UprightRectangleGL (const Ceylan::Maths::Linear::Bipoint &upperLeftCorner, const Ceylan::Maths::Linear::Bipoint &lowerRightCorner) | |
Two corners define an UprightRectangleGL. | |
UprightRectangleGL (const Ceylan::Maths::Linear::Bipoint &upperLeftCorner, OpenGL::GLLength width, OpenGL::GLLength height) | |
One corner, width and height define an UprightRectangleGL. | |
UprightRectangleGL (OpenGL::GLCoordinate x, OpenGL::GLCoordinate y, OpenGL::GLLength width, OpenGL::GLLength height) | |
Two coordinates, width and height define an UprightRectangleGL. | |
virtual | ~UprightRectangleGL () throw () |
Basic destructor, so that it remains virtual. | |
virtual Ceylan::Maths::Linear::Bipoint | getUpperLeftCorner () const |
Returns this UprightRectangleGL's upper left corner. | |
virtual void | setUpperLeftCorner (Ceylan::Maths::Linear::Bipoint &newUpperLeftCorner) |
Sets this UprightRectangleGL's upper left corner, width and height do not change. | |
virtual OpenGL::GLCoordinate | getUpperLeftAbscissa () const |
Returns directly the abscissa of upper left corner. | |
virtual OpenGL::GLCoordinate | getUpperLeftOrdinate () const |
Returns directly the ordiante of upper left corner. | |
virtual OpenGL::GLLength | getWidth () const |
Returns this UprightRectangleGL's width. | |
virtual void | setWidth (OpenGL::GLLength newWidth) |
Sets this UprightRectangleGL's width. | |
virtual OpenGL::GLLength | getHeight () const |
Returns this UprightRectangleGL's height. | |
virtual void | setHeight (OpenGL::GLLength newHeight) |
Sets this UprightRectangleGL's height. | |
virtual bool | draw () const |
Draws directly this UprightRectangleGL thanks to OpenGL. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns an user-friendly description of the state of this object. | |
Protected Attributes | |
OpenGL::GLCoordinate | _x |
Upper left corner's abscissa (horizontal coordinate). | |
OpenGL::GLCoordinate | _y |
Upper left corner's ordinate (vertical coordinate). | |
OpenGL::GLLength | _width |
Width is counted from current abscissa, going right. | |
OpenGL::GLLength | _height |
Height is count from current ordinate, going down. | |
Private Member Functions | |
UprightRectangleGL (const UprightRectangleGL &source) | |
Copy constructor made private to ensure that it will never be called. | |
UprightRectangleGL & | operator= (const UprightRectangleGL &source) |
Assignment operator made private to ensure that it will never be called. |
This classes defines a rectangle whose sides are parallel or orthogonal to the screen's sides, according to OpenGL conventions.
The rectangle lies in the plane z=0 and has sides parallel to the x and y axes.
Definition at line 106 of file OSDLGLUprightRectangle.h.
OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL | ( | const Ceylan::Maths::Linear::Bipoint & | upperLeftCorner, | |
const Ceylan::Maths::Linear::Bipoint & | lowerRightCorner | |||
) |
Two corners define an UprightRectangleGL.
OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL | ( | const Ceylan::Maths::Linear::Bipoint & | upperLeftCorner, | |
OpenGL::GLLength | width, | |||
OpenGL::GLLength | height | |||
) |
One corner, width and height define an UprightRectangleGL.
OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL | ( | OpenGL::GLCoordinate | x, | |
OpenGL::GLCoordinate | y, | |||
OpenGL::GLLength | width, | |||
OpenGL::GLLength | height | |||
) |
Two coordinates, width and height define an UprightRectangleGL.
UprightRectangleGL::~UprightRectangleGL | ( | ) | throw () [virtual] |
Basic destructor, so that it remains virtual.
Definition at line 110 of file OSDLGLUprightRectangle.cc.
OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL | ( | const UprightRectangleGL & | source | ) | [explicit, private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
bool UprightRectangleGL::draw | ( | ) | const [virtual] |
Draws directly this UprightRectangleGL thanks to OpenGL.
Definition at line 189 of file OSDLGLUprightRectangle.cc.
GLLength UprightRectangleGL::getHeight | ( | ) | const [virtual] |
Returns this UprightRectangleGL's height.
Definition at line 171 of file OSDLGLUprightRectangle.cc.
References _height.
GLCoordinate UprightRectangleGL::getUpperLeftAbscissa | ( | ) | const [virtual] |
Returns directly the abscissa of upper left corner.
Definition at line 137 of file OSDLGLUprightRectangle.cc.
References _x.
Bipoint UprightRectangleGL::getUpperLeftCorner | ( | ) | const [virtual] |
Returns this UprightRectangleGL's upper left corner.
Definition at line 117 of file OSDLGLUprightRectangle.cc.
GLCoordinate UprightRectangleGL::getUpperLeftOrdinate | ( | ) | const [virtual] |
Returns directly the ordiante of upper left corner.
Definition at line 146 of file OSDLGLUprightRectangle.cc.
References _y.
GLLength UprightRectangleGL::getWidth | ( | ) | const [virtual] |
Returns this UprightRectangleGL's width.
Definition at line 155 of file OSDLGLUprightRectangle.cc.
References _width.
UprightRectangleGL& OSDL::Video::TwoDimensional::UprightRectangleGL::operator= | ( | const UprightRectangleGL & | source | ) | [private] |
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
virtual void OSDL::Video::TwoDimensional::UprightRectangleGL::setHeight | ( | OpenGL::GLLength | newHeight | ) | [virtual] |
Sets this UprightRectangleGL's height.
virtual void OSDL::Video::TwoDimensional::UprightRectangleGL::setUpperLeftCorner | ( | Ceylan::Maths::Linear::Bipoint & | newUpperLeftCorner | ) | [virtual] |
Sets this UprightRectangleGL's upper left corner, width and height do not change.
virtual void OSDL::Video::TwoDimensional::UprightRectangleGL::setWidth | ( | OpenGL::GLLength | newWidth | ) | [virtual] |
Sets this UprightRectangleGL's width.
const string UprightRectangleGL::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Definition at line 209 of file OSDLGLUprightRectangle.cc.
References _height, _width, _x, and _y.
Referenced by operator<<().
Height is count from current ordinate, going down.
Definition at line 248 of file OSDLGLUprightRectangle.h.
Referenced by draw(), getHeight(), and toString().
Width is counted from current abscissa, going right.
Definition at line 243 of file OSDLGLUprightRectangle.h.
Referenced by draw(), getWidth(), and toString().
Upper left corner's abscissa (horizontal coordinate).
Definition at line 232 of file OSDLGLUprightRectangle.h.
Referenced by draw(), getUpperLeftAbscissa(), getUpperLeftCorner(), and toString().
Upper left corner's ordinate (vertical coordinate).
Definition at line 237 of file OSDLGLUprightRectangle.h.
Referenced by draw(), getUpperLeftCorner(), getUpperLeftOrdinate(), and toString().