Robot Simulator of the Robotics Group for Self-Organization of Control: osgmainloop.h Source File

# osgmainloop.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005-2011 LpzRobots development team                    *
    00003  *    Georg Martius  <georg dot martius at web dot de>                     *
    00004  *    Frank Guettler <guettler at informatik dot uni-leipzig dot de        *
    00005  *    Frank Hesse    <frank at nld dot ds dot mpg dot de>                  *
    00006  *    Ralf Der       <ralfder at mis dot mpg dot de>                       *
    00007  *                                                                         *
    00008  *   This program is free software; you can redistribute it and/or modify  *
    00009  *   it under the terms of the GNU General Public License as published by  *
    00010  *   the Free Software Foundation; either version 2 of the License, or     *
    00011  *   (at your option) any later version.                                   *
    00012  *                                                                         *
    00013  *   This program is distributed in the hope that it will be useful,       *
    00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00016  *   GNU General Public License for more details.                          *
    00017  *                                                                         *
    00018  *   You should have received a copy of the GNU General Public License     *
    00019  *   along with this program; if not, write to the                         *
    00020  *   Free Software Foundation, Inc.,                                       *
    00021  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    00022  *                                                                         *
    00023  ***************************************************************************/
    00024 #ifndef __OSGMAINLOOP_H
    00025 #define __OSGMAINLOOP_H
    00026
    00027 #include <ode-dbl/ode.h>
    00028
    00029 #include "odehandle.h"
    00030 #include "globaldata.h"
    00031
    00032 class OSGMainLoop {
    00033 public:
    00034   OSGMainLoop(){
    00035
    00036   }
    00037
    00038 protected:
    00039   /// user defined start function (called at the beginning of the simulation)
    00040   void (*startFunction)(const OdeHandle&, GlobalData& globalData);
    00041   /// user defined end function (called after the simulation)
    00042   void (*endFunction)(GlobalData& globalData);
    00043   /// pointer to the config function of the user
    00044   void (*configFunction)(GlobalData& globalData);
    00045   // command function, set by user
    00046   void (*commandFunction)(const OdeHandle&, GlobalData& globalData, int key);
    00047   /// pointer to the user defined additional function
    00048   void (*collisionCallback)(const OdeHandle&, void* data, dGeomID o1, dGeomID o2);
    00049   /// pointer to the user defined additional function which is executed in each simulationstep
    00050   void (*additionalCallback)(GlobalData& globalData, bool draw, bool pause);
    00051 }
    00052
    00053
    00054 #endif