1 /**************************************************************************/ 2 /* Copyright 2009 Tim Day */ 3 /* */ 4 /* This file is part of Fracplanet */ 5 /* */ 6 /* Fracplanet is free software: you can redistribute it and/or modify */ 7 /* it under the terms of the GNU General Public License as published by */ 8 /* the Free Software Foundation, either version 3 of the License, or */ 9 /* (at your option) any later version. */ 10 /* */ 11 /* Fracplanet is distributed in the hope that it will be useful, */ 12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 /* GNU General Public License for more details. */ 15 /* */ 16 /* You should have received a copy of the GNU General Public License */ 17 /* along with Fracplanet. If not, see <http://www.gnu.org/licenses/>. */ 18 /**************************************************************************/ 19 20 /*! \file 21 \brief Interface for class ParametersRender. 22 */ 23 24 #ifndef _parameters_render_h_ 25 #define _parameters_render_h_ 26 27 #include <boost/program_options/errors.hpp> 28 #include <boost/program_options/options_description.hpp> 29 #include <boost/program_options/parsers.hpp> 30 #include <boost/program_options/variables_map.hpp> 31 32 #include "common.h" 33 #include "rgb.h" 34 35 class XYZ; 36 37 //! Aggregates controllable parameters for all things related to OpenGL rendering. 38 class ParametersRender 39 { 40 public: 41 42 //! Constructor. 43 ParametersRender(const boost::program_options::variables_map& opts); 44 45 //! Destructor. 46 ~ParametersRender(); 47 48 //! Flag selecting OpenGL wireframe rendering. 49 bool wireframe; 50 51 //! Render via display list 52 bool display_list; 53 54 //! Joystick mode for flight 55 bool joystick_mouse; 56 57 //! Amount of global ambient illumination (0-1) 58 float ambient; 59 60 //! Controls illumination direction. 61 float illumination_azimuth; 62 63 //! Controls illumination direction. 64 float illumination_elevation; 65 66 //! Background colour at low altitude 67 FloatRGBA background_colour_low; 68 69 //! Background colour at high altitude 70 FloatRGBA background_colour_high; 71 72 //! Target frame rate 73 float fps_target; 74 75 //! Illumination direction computed from azimuth and elevation angles 76 const XYZ illumination_direction() const; 77 78 static boost::program_options::options_description options(); 79 }; 80 81 #endif 82