osgmainloop.h

Go to the documentation of this file.
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  ***************************************************************************
00023  *                                                                         *
00024  *   This file provides the main simulation loop using open scene graph    *
00025  *   It creates the world scene and call the call back functions and so on.*
00026  *                                                                         *
00027  *                                                                         *
00028  *   $Log: osgmainloop.h,v $
00029  *   Revision 1.2  2006/07/14 12:23:35  martius
00030  *   selforg becomes HEAD
00031  *
00032  *   Revision 1.1.2.1  2005/12/06 10:13:24  martius
00033  *   openscenegraph integration started
00034  *
00035  *                                                                 *
00036  *                                                                         *
00037  ***************************************************************************/
00038 #ifndef __OSGMAINLOOP_H
00039 #define __OSGMAINLOOP_H
00040 
00041 #include <ode/ode.h>
00042 
00043 #include "odehandle.h"
00044 #include "globaldata.h"
00045 
00046 class OSGMainLoop {
00047 public:
00048   OSGMainLoop(){
00049 
00050   }
00051   
00052 protected:
00053   /// user defined start function (called at the beginning of the simulation)
00054   void (*startFunction)(const OdeHandle&, GlobalData& globalData);
00055   /// user defined end function (called after the simulation)
00056   void (*endFunction)(GlobalData& globalData); 
00057   /// pointer to the config function of the user
00058   void (*configFunction)(GlobalData& globalData);
00059   // command function, set by user
00060   void (*commandFunction)(const OdeHandle&, GlobalData& globalData, int key); 
00061   /// pointer to the user defined additional function
00062   void (*collisionCallback)(const OdeHandle&, void* data, dGeomID o1, dGeomID o2);
00063   /// pointer to the user defined additional function which is executed in each simulationstep
00064   void (*additionalCallback)(GlobalData& globalData, bool draw, bool pause);
00065 }
00066 
00067 
00068 #endif

Generated on Fri Oct 30 16:29:01 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7