Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
motionblurcallback.h
Go to the documentation of this file.
1 /***************************************************************************
2  * callback class for motion blur *
3  * the param globalData.odeConfig.motionPersistence determines *
4  * the level of motion blur *
5  * *
6  ***************************************************************************/
7 /***************************************************************************
8  * Copyright (C) 2005-2011 LpzRobots development team *
9  * Georg Martius <georg dot martius at web dot de> *
10  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
11  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
12  * Ralf Der <ralfder at mis dot mpg dot de> *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the *
26  * Free Software Foundation, Inc., *
27  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28  * *
29  ***************************************************************************/
30 #ifndef __MOTIONBLURCALLBACK_H
31 #define __MOTIONBLURCALLBACK_H
32 
33 #include <osgProducer/OsgSceneHandler>
34 #include "globaldata.h"
35 
36 namespace lpzrobots {
37 
38  /** a class that enables motion blur for the scenegraph
39  * should be called in the main simulation loop
40  */
41  class MotionBlurDrawCallback: public osgProducer::OsgSceneHandler::Callback
42  {
43  public:
44  /** globalData.odeConfig.motionPersistence - determines the level of motion blur,
45  * between 0.0 and 1.0, for example:
46  * heavy motion blur is set by globalData.odeConfig.motionPersistance=0.25
47  * light motuib blur is set by globalData.odeConfig.motionPersistence=0.1
48  */
50 
51  virtual void operator()(osgProducer::OsgSceneHandler &handler, Producer::Camera &camera);
52 
53  private:
54  bool cleared_;
55  double t0_;
56  double persistence_;
57  GlobalData& globalData; // the global environment variables
58  };
59 
60 }
61 
62 #endif
virtual void operator()(osgProducer::OsgSceneHandler &handler, Producer::Camera &camera)
Definition: motionblurcallback.cpp:37
a class that enables motion blur for the scenegraph should be called in the main simulation loop ...
Definition: motionblurcallback.h:41
Data structure holding all essential global information.
Definition: globaldata.h:57
MotionBlurDrawCallback(GlobalData &global)
globalData.odeConfig.motionPersistence - determines the level of motion blur, between 0...
Definition: motionblurcallback.cpp:34