OSDL::Video::TwoDimensional::UprightRectangleGL Class Reference

#include <OSDLGLUprightRectangle.h>

List of all members.


Detailed Description

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.

Note:
As long as no different platform is used, it happens that Ceylan::Maths::Real, which itself is a Ceylan::Float32, i.e. a float, is the same type as GLfloat. Therefore Ceylan::Maths::Linear::Bipoint instances, which rely on Real, can be used directly. If this relation had to change, then C++ template should be used instead.

Definition at line 71 of file OSDLGLUprightRectangle.h.

Public Member Functions

 UprightRectangleGL (const Ceylan::Maths::Linear::Bipoint &upperLeftCorner, const Ceylan::Maths::Linear::Bipoint &lowerRightCorner) throw ( VideoException )
 Two corners define an UprightRectangleGL.
 UprightRectangleGL (const Ceylan::Maths::Linear::Bipoint &upperLeftCorner, OpenGL::GLLength width, OpenGL::GLLength height) throw ()
 One corner, width and height define an UprightRectangleGL.
 UprightRectangleGL (OpenGL::GLCoordinate x, OpenGL::GLCoordinate y, OpenGL::GLLength width, OpenGL::GLLength height) throw ()
 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 throw ()
 Returns this UprightRectangleGL's upper left corner.
virtual void setUpperLeftCorner (Ceylan::Maths::Linear::Bipoint &newUpperLeftCorner) throw ()
 Sets this UprightRectangleGL's upper left corner, width and height do not change.
virtual OpenGL::GLCoordinate getUpperLeftAbscissa () const throw ()
 Returns directly the abscissa of upper left corner.
virtual OpenGL::GLCoordinate getUpperLeftOrdinate () const throw ()
 Returns directly the ordiante of upper left corner.
virtual OpenGL::GLLength getWidth () const throw ()
 Returns this UprightRectangleGL's width.
virtual void setWidth (OpenGL::GLLength newWidth) throw ()
 Sets this UprightRectangleGL's width.
virtual OpenGL::GLLength getHeight () const throw ()
 Returns this UprightRectangleGL's height.
virtual void setHeight (OpenGL::GLLength newHeight) throw ()
 Sets this UprightRectangleGL's height.
virtual bool draw () const throw ()
 Draws directly this UprightRectangleGL thanks to OpenGL.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw ()
 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) throw ()
 Copy constructor made private to ensure that it will never be called.
UprightRectangleGLoperator= (const UprightRectangleGL &source) throw ()
 Assignment operator made private to ensure that it will never be called.


Constructor & Destructor Documentation

OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL ( const Ceylan::Maths::Linear::Bipoint &  upperLeftCorner,
const Ceylan::Maths::Linear::Bipoint &  lowerRightCorner 
) throw ( VideoException )

Two corners define an UprightRectangleGL.

OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL ( const Ceylan::Maths::Linear::Bipoint &  upperLeftCorner,
OpenGL::GLLength  width,
OpenGL::GLLength  height 
) throw ()

One corner, width and height define an UprightRectangleGL.

UprightRectangleGL::UprightRectangleGL ( OpenGL::GLCoordinate  x,
OpenGL::GLCoordinate  y,
OpenGL::GLLength  width,
OpenGL::GLLength  height 
) throw ()

Two coordinates, width and height define an UprightRectangleGL.

Definition at line 67 of file OSDLGLUprightRectangle.cc.

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

Basic destructor, so that it remains virtual.

Definition at line 78 of file OSDLGLUprightRectangle.cc.

OSDL::Video::TwoDimensional::UprightRectangleGL::UprightRectangleGL ( const UprightRectangleGL source  )  throw () [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.


Member Function Documentation

Bipoint UprightRectangleGL::getUpperLeftCorner (  )  const throw () [virtual]

Returns this UprightRectangleGL's upper left corner.

Definition at line 84 of file OSDLGLUprightRectangle.cc.

References _x, and _y.

virtual void OSDL::Video::TwoDimensional::UprightRectangleGL::setUpperLeftCorner ( Ceylan::Maths::Linear::Bipoint &  newUpperLeftCorner  )  throw () [virtual]

Sets this UprightRectangleGL's upper left corner, width and height do not change.

GLCoordinate UprightRectangleGL::getUpperLeftAbscissa (  )  const throw () [virtual]

Returns directly the abscissa of upper left corner.

Definition at line 102 of file OSDLGLUprightRectangle.cc.

References _x.

GLCoordinate UprightRectangleGL::getUpperLeftOrdinate (  )  const throw () [virtual]

Returns directly the ordiante of upper left corner.

Definition at line 110 of file OSDLGLUprightRectangle.cc.

References _y.

GLLength UprightRectangleGL::getWidth (  )  const throw () [virtual]

Returns this UprightRectangleGL's width.

Definition at line 118 of file OSDLGLUprightRectangle.cc.

References _width.

void UprightRectangleGL::setWidth ( OpenGL::GLLength  newWidth  )  throw () [virtual]

Sets this UprightRectangleGL's width.

Definition at line 124 of file OSDLGLUprightRectangle.cc.

GLLength UprightRectangleGL::getHeight (  )  const throw () [virtual]

Returns this UprightRectangleGL's height.

Definition at line 132 of file OSDLGLUprightRectangle.cc.

References _height.

void UprightRectangleGL::setHeight ( OpenGL::GLLength  newHeight  )  throw () [virtual]

Sets this UprightRectangleGL's height.

Definition at line 140 of file OSDLGLUprightRectangle.cc.

bool UprightRectangleGL::draw (  )  const throw () [virtual]

Draws directly this UprightRectangleGL thanks to OpenGL.

Definition at line 148 of file OSDLGLUprightRectangle.cc.

References _height, _width, _x, and _y.

const string UprightRectangleGL::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

Definition at line 167 of file OSDLGLUprightRectangle.cc.

References OSDL::Video::Pixels::toString().

UprightRectangleGL& OSDL::Video::TwoDimensional::UprightRectangleGL::operator= ( const UprightRectangleGL source  )  throw () [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.


Member Data Documentation

OpenGL::GLCoordinate OSDL::Video::TwoDimensional::UprightRectangleGL::_x [protected]

Upper left corner's abscissa (horizontal coordinate).

Definition at line 193 of file OSDLGLUprightRectangle.h.

Referenced by draw(), getUpperLeftAbscissa(), and getUpperLeftCorner().

OpenGL::GLCoordinate OSDL::Video::TwoDimensional::UprightRectangleGL::_y [protected]

Upper left corner's ordinate (vertical coordinate).

Definition at line 197 of file OSDLGLUprightRectangle.h.

Referenced by draw(), getUpperLeftCorner(), and getUpperLeftOrdinate().

OpenGL::GLLength OSDL::Video::TwoDimensional::UprightRectangleGL::_width [protected]

Width is counted from current abscissa, going right.

Definition at line 201 of file OSDLGLUprightRectangle.h.

Referenced by draw(), and getWidth().

OpenGL::GLLength OSDL::Video::TwoDimensional::UprightRectangleGL::_height [protected]

Height is count from current ordinate, going down.

Definition at line 205 of file OSDLGLUprightRectangle.h.

Referenced by draw(), and getHeight().


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