GLVolumesArch.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __GL_VOLUMES_ARCH_H
00004 #define __GL_VOLUMES_ARCH_H
00005 
00006 #include <gra/arch/GLArch.h>
00007 
00008 namespace gra {
00009 
00015 class GRA_EXPORT GLVolumesArch : public GLArch {
00016 protected:
00017         bool    _showSubVolumes;
00018         bool    _showObjects;
00019         Vector3 _volumesColor;
00020         float   _volumesTransp;
00021 
00022 public:
00023         struct Params : public GLArch::Params {
00024                 bool    showSubVolumes; 
00025                 bool    showObjects;    
00026                 Vector3 volumesColor;   
00027                 float   volumesTransp;  
00028 
00029                 Params()
00030                     : showSubVolumes(false),
00031                       showObjects(false),
00032                       volumesColor(1.0,1.0,1.0),
00033                       volumesTransp(0.5) {}
00034         };
00035     
00036 public:
00042         GLVolumesArch (GLVolumesArch::Params& params) : GLArch(params) {
00043             _showSubVolumes = params.showSubVolumes;
00044             _showObjects    = params.showObjects;
00045             _volumesTransp  = paras.volumesTransp;
00046             _volumesColor.set(params.volumesColor);
00047         }
00048         
00052         virtual Render* createRender (void) {
00053             return new GLBVRender(_pStopFlag, _useDisplayList,
00054                                   _showSubVolumes, _showObjects,
00055                                   _volumesColor, _volumesTransp);
00056         }
00057 };
00058     
00059 } // namespace
00060 
00061 #endif // __GL_VOLUMES_ARCH_H

Generated on Tue Nov 21 15:11:42 2006 for gra by  doxygen 1.4.6