Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GOpenGLForm.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Raphael Langerhorst                             *
00003  *   raphael-langerhorst@gmx.at                                            *
00004  *                                                                         *
00005  *   Permission is hereby granted, free of charge, to any person obtaining *
00006  *   a copy of this software and associated documentation files (the       *
00007  *   "Software"), to deal in the Software without restriction, including   *
00008  *   without limitation the rights to use, copy, modify, merge, publish,   *
00009  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00010  *   permit persons to whom the Software is furnished to do so, subject to *
00011  *   the following conditions:                                             *
00012  *                                                                         *
00013  *   The above copyright notice and this permission notice shall be        *
00014  *   included in all copies or substantial portions of the Software.       *
00015  *                                                                         *
00016  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00017  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00018  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00019  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00020  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00021  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00022  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00023  ***************************************************************************/
00024  
00025 #ifndef GBEGOPENGLFORMH
00026 #define GBEGOPENGLFORMH
00027 
00028 #include <GForm.h>
00029 
00030 #include <qgl.h>
00031 #include <qcolor.h>
00032 
00033 namespace GBE
00034 {
00035 
00048 class GOpenGLForm : public GCS::GForm
00049 {
00050 
00051   public:
00052 
00057     double Radius;
00058 
00062     float RGBA[4];
00063     
00064   public:
00065 
00070     GOpenGLForm(const GCS::GVector3& position = GCS::GVector3(0,0,0),
00071              const GCS::GVector3& rotation = GCS::GVector3(0,0,0),
00072              double radius = 1)
00073     : GCS::GForm(position,rotation),
00074       Radius(radius)
00075     {
00076       RGBA[0] = RGBA[1] = RGBA[2] = RGBA[3] = 0.5;
00077     }
00078 
00083     virtual ~GOpenGLForm()
00084     {}
00085     
00086     //please make sure these are called in a valid OpenGL context!!
00087     
00092     virtual void transform() const;
00093     
00097     virtual void render() const;
00098     
00099     
00104     virtual double getRadiusMax() const { return Radius; }
00105     
00110     virtual double getRadiusMin() const { return Radius; }
00111 
00112 };
00113 
00114 };
00115 
00116 #endif

Generated on Thu Oct 21 21:18:03 2004 for G System by doxygen 1.3.6