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
tmpobject.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __TMPOBJECT_H
25 #define __TMPOBJECT_H
26 
27 #include "osghandle.h"
28 #include "odehandle.h"
29 #include "pose.h"
30 
31 namespace lpzrobots {
32 
33  /**
34  this is the base-class for objects that exist temporarily like
35  some indicator of manipulation or a message text
36  */
37  class TmpObject {
38  public:
40  : time(0) {} ;
41 
42  virtual ~TmpObject() {};
43  virtual void init(const OdeHandle& odeHandle, const OsgHandle& osgHandle) = 0;
44  /// deletes the object
45  virtual void deleteObject() = 0;
46  /// update graphics here
47  virtual void update() =0 ;
48 
49  void setExpireTime(double time) { this->time= time; }
50  bool expired(double time) { return this->time < time;}
51 
52  protected:
53  double time;
54  };
55 
56 }
57 
58 #endif
Data structure for accessing the ODE.
Definition: odehandle.h:44
TmpObject()
Definition: tmpobject.h:39
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
double time
Definition: tmpobject.h:53
virtual ~TmpObject()
Definition: tmpobject.h:42
void setExpireTime(double time)
Definition: tmpobject.h:49
virtual void deleteObject()=0
deletes the object
this is the base-class for objects that exist temporarily like some indicator of manipulation or a me...
Definition: tmpobject.h:37
bool expired(double time)
Definition: tmpobject.h:50
virtual void update()=0
update graphics here
virtual void init(const OdeHandle &odeHandle, const OsgHandle &osgHandle)=0