motionblurcallback.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * callback class for motion blur * 00003 * the param globalData.odeConfig.motionPersistence determines * 00004 * the level of motion blur * 00005 * * 00006 ***************************************************************************/ 00007 /*************************************************************************** 00008 * Copyright (C) 2005 by Robot Group Leipzig * 00009 * martius@informatik.uni-leipzig.de * 00010 * fhesse@informatik.uni-leipzig.de * 00011 * der@informatik.uni-leipzig.de * 00012 * frankguettler@gmx.de * 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 * This program is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 * GNU General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU General Public License * 00025 * along with this program; if not, write to the * 00026 * Free Software Foundation, Inc., * 00027 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00028 * * 00029 * $Log: motionblurcallback.h,v $ 00030 * Revision 1.2 2006/07/14 12:23:35 martius 00031 * selforg becomes HEAD 00032 * 00033 * Revision 1.1.2.1 2006/04/27 16:18:24 robot3 00034 * motionblurcallback for the simulation 00035 * 00036 * * 00037 ***************************************************************************/ 00038 #ifndef __MOTIONBLURCALLBACK_H 00039 #define __MOTIONBLURCALLBACK_H 00040 00041 #include <osgProducer/OsgSceneHandler> 00042 #include "globaldata.h" 00043 00044 namespace lpzrobots { 00045 00046 /** a class that enables motion blur for the scenegraph 00047 * should be called in the main simulation loop 00048 */ 00049 class MotionBlurDrawCallback: public osgProducer::OsgSceneHandler::Callback 00050 { 00051 public: 00052 /** globalData.odeConfig.motionPersistence - determines the level of motion blur, 00053 * between 0.0 and 1.0, for example: 00054 * heavy motion blur is set by globalData.odeConfig.motionPersistance=0.25 00055 * light motuib blur is set by globalData.odeConfig.motionPersistence=0.1 00056 */ 00057 MotionBlurDrawCallback(GlobalData& global); 00058 00059 virtual void operator()(osgProducer::OsgSceneHandler &handler, Producer::Camera &camera); 00060 00061 private: 00062 bool cleared_; 00063 double t0_; 00064 double persistence_; 00065 GlobalData& globalData; // the global environment variables 00066 }; 00067 00068 } 00069 00070 #endif

Generated on Tue Jan 16 02:14:36 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8