OSDLGLUprightRectangle.h

Go to the documentation of this file.
00001 #ifndef OSDL_UPRIGHT_RECTANGLE_GL_H_
00002 #define OSDL_UPRIGHT_RECTANGLE_GL_H_
00003 
00004 
00005 
00006 #include "OSDLOpenGL.h"        // for GLLength, GLCoordinate, etc.
00007 #include "OSDLPixel.h"         // for ColorElement
00008 
00009 #include "Ceylan.h"            // for Bipoint
00010 
00011 
00012 #include <iostream>           // for ostream
00013 #include <string>
00014 
00015 
00016 
00017 namespace Ceylan 
00018 {
00019 
00020     namespace Maths 
00021     {
00022     
00023         namespace Linear 
00024         {
00025 
00026             // UprightRectangleGL can be defined thanks to Bipoint instances.
00027             class Bipoint ;
00028         
00029         }
00030     
00031     }
00032     
00033 }       
00034         
00035 
00036 
00037 namespace OSDL 
00038 {
00039 
00040     namespace Video 
00041     {
00042         
00043         
00044         
00045         // UprightRectangleGL instances can be drawn into surfaces.
00046         class Surface ;
00047         
00048         
00049         namespace TwoDimensional
00050         {
00051         
00052         
00053             
00071             class OSDL_DLL  UprightRectangleGL : 
00072                 public Ceylan::TextDisplayable
00073             {
00074             
00075                     
00076                 /*
00077                  * No equality operator defined, since relying on 
00078                  * floating point values.
00079                  *
00080                  */
00081                         
00082                         
00083                 public:
00084 
00085 
00087                     UprightRectangleGL( 
00088                         const Ceylan::Maths::Linear::Bipoint & upperLeftCorner,
00089                         const Ceylan::Maths::Linear::Bipoint & lowerRightCorner
00090                     ) throw( VideoException ) ;
00091                     
00092                     
00098                     UprightRectangleGL( 
00099                         const Ceylan::Maths::Linear::Bipoint & upperLeftCorner, 
00100                         OpenGL::GLLength width, OpenGL::GLLength height )
00101                             throw() ;
00102                     
00103                     
00109                     UprightRectangleGL( 
00110                         OpenGL::GLCoordinate x, OpenGL::GLCoordinate y,
00111                         OpenGL::GLLength width, OpenGL::GLLength height )
00112                             throw() ;
00113                      
00114                      
00116                     virtual ~UprightRectangleGL() throw() ;
00117     
00118     
00120                     virtual Ceylan::Maths::Linear::Bipoint 
00121                         getUpperLeftCorner() const throw() ; 
00122                     
00123                     
00129                     virtual void setUpperLeftCorner( 
00130                         Ceylan::Maths::Linear::Bipoint & newUpperLeftCorner )
00131                             throw() ; 
00132                     
00133                     
00134                     
00136                     virtual OpenGL::GLCoordinate getUpperLeftAbscissa() 
00137                         const throw() ;
00138 
00139 
00141                     virtual OpenGL::GLCoordinate getUpperLeftOrdinate() 
00142                         const throw() ;
00143                     
00144                     
00145                     
00147                     virtual OpenGL::GLLength getWidth() const throw() ;
00148                 
00149                 
00151                     virtual void setWidth( OpenGL::GLLength newWidth ) throw() ;
00152     
00153     
00154     
00156                     virtual OpenGL::GLLength getHeight() const throw() ;
00157                 
00158                 
00160                     virtual void setHeight( OpenGL::GLLength newHeight ) 
00161                         throw() ;
00162                         
00163     
00168                     virtual bool draw() const throw() ;
00169                     
00170                     
00183                     virtual const std::string toString( 
00184                             Ceylan::VerbosityLevels level = Ceylan::high ) 
00185                         const throw() ;
00186                 
00187     
00188     
00189                 protected:
00190                 
00191                 
00193                     OpenGL::GLCoordinate _x ;
00194                 
00195                 
00197                     OpenGL::GLCoordinate _y ;
00198                 
00199                 
00201                     OpenGL::GLLength _width ;
00202                 
00203                 
00205                     OpenGL::GLLength _height ;          
00206             
00207             
00208             
00209                 private:
00210                 
00211                 
00220                     explicit UprightRectangleGL( 
00221                         const UprightRectangleGL & source ) throw() ;
00222             
00223             
00232                     UprightRectangleGL & operator = ( 
00233                         const UprightRectangleGL & source ) throw() ;
00234     
00235     
00236             } ; 
00237 
00238         }
00239         
00240     }
00241     
00242 }
00243 
00244     
00245 
00247 OSDL_DLL std::ostream & operator << ( std::ostream & os, 
00248     OSDL::Video::TwoDimensional::UprightRectangleGL & rect ) throw() ;
00249 
00250 
00251 
00252 #endif // OSDL_UPRIGHT_RECTANGLE_GL_H_
00253 

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1