00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 * * 00022 * $Log: odeconfig.h,v $ 00023 * Revision 1.18 2008/04/23 07:17:16 martius 00024 * makefiles cleaned 00025 * new also true realtime factor displayed, 00026 * warning if out of sync 00027 * drawinterval in full speed is 10 frames, independent of the speed 00028 * 00029 * Revision 1.17 2007/07/30 14:13:17 martius 00030 * drawBoundings moved to osgHandle 00031 * 00032 * Revision 1.16 2007/06/08 15:37:22 martius 00033 * random seed into OdeConfig -> logfiles 00034 * 00035 * Revision 1.15 2007/01/25 14:09:50 martius 00036 * use new configurable addParameter feature 00037 * 00038 * Revision 1.14 2006/08/04 15:07:46 martius 00039 * documentation 00040 * 00041 * Revision 1.13 2006/07/14 11:57:23 martius 00042 * selforg becomes HEAD 00043 * 00044 * Revision 1.12.4.8 2006/06/29 16:32:44 robot3 00045 * implementation of odeconfig moved to odeconfig.cpp 00046 * 00047 * Revision 1.12.4.7 2006/05/08 12:12:36 robot3 00048 * changes from Revision 1.40.4.27 reverted 00049 * 00050 * Revision 1.12.4.6 2006/04/27 16:17:38 robot3 00051 * implemented some functions for motionblurcallback 00052 * 00053 * Revision 1.12.4.5 2006/03/28 09:55:12 robot3 00054 * -main: fixed snake explosion bug 00055 * -odeconfig.h: inserted cameraspeed 00056 * -camermanipulator.cpp: fixed setbyMatrix, 00057 * updateFactor 00058 * 00059 * Revision 1.12.4.4 2006/02/08 16:14:28 martius 00060 * no namespace using 00061 * 00062 * Revision 1.12.4.3 2006/01/10 15:08:15 martius 00063 * controlinterval is 1 by default 00064 * 00065 * Revision 1.12.4.2 2005/12/06 10:13:23 martius 00066 * openscenegraph integration started 00067 * 00068 * Revision 1.12.4.1 2005/11/14 17:37:00 martius 00069 * changed makefile structure to have and include directory 00070 * mode to selforg 00071 * 00072 * Revision 1.12 2005/11/09 13:29:19 martius 00073 * GPL'ised 00074 * 00075 ***************************************************************************/ 00076 #ifndef __ODECONFIG_H 00077 #define __ODECONFIG_H 00078 00079 #include <selforg/configurable.h> 00080 #include "odehandle.h" 00081 00082 namespace lpzrobots { 00083 00084 /** 00085 The class $name holds the configurable parameters of the simulation environment. 00086 */ 00087 class OdeConfig : public Configurable { 00088 public: 00089 00090 // creates new instance of OdeConfig with default values 00091 OdeConfig(); 00092 00093 virtual ~OdeConfig() {} 00094 00095 virtual paramlist getParamList() const; 00096 00097 virtual paramval getParam(const paramkey& key) const; 00098 00099 virtual bool setParam(const paramkey& key, paramval val); 00100 00101 virtual void setOdeHandle(const OdeHandle& odeHandle); 00102 00103 virtual void setVideoRecordingMode(bool mode); 00104 00105 virtual void calcAndSetDrawInterval(int Hz, double rtf); 00106 00107 private: 00108 /// calculates the draw interval with simStepSize and realTimeFactor so that we have the Hz frames/sec 00109 int calcDrawInterval(int Hz, double rtf); 00110 00111 public: 00112 bool videoRecordingMode; 00113 double simStepSize; 00114 double realTimeFactor; 00115 double motionPersistence; 00116 int drawInterval; 00117 int controlInterval; 00118 double noise; 00119 double gravity; 00120 double cameraSpeed; 00121 long randomSeed; 00122 OdeHandle odeHandle; 00123 00124 }; 00125 00126 } 00127 00128 #endif