Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/physics/physics_engine.h @ 4504

Last change on this file since 4504 was 4394, checked in by bensch, 19 years ago

orxonox/trunk: PhysicsEngine is now aware of the existing fields and interfaces

File size: 1.2 KB
Line 
1/*!
2    \file physics_engine.h
3    \brief Definition of the ... singleton Class
4   
5*/
6
7#ifndef _PHYSICS_ENGINE_H
8#define _PHYSICS_ENGINE_H
9
10#include "base_object.h"
11
12#include "physics_connection.h"
13#include "physics_interface.h"
14#include "field.h"
15
16// Forward Declaration
17template<class T> class tList;
18
19
20//! A default singleton class.
21class PhysicsEngine : public BaseObject {
22
23 public:
24  static PhysicsEngine* getInstance(void);
25  virtual ~PhysicsEngine(void);
26
27  void addPhysicsInterface(PhysicsInterface* physicsInterface);
28  void removePhysicsInterface(PhysicsInterface* physicsInterface);
29
30  void addField(Field* field);
31  void removeField(Field* field);
32
33  void addConnection(PhysicsConnection* connection);
34  void removeConnection(PhysicsConnection* connection);
35
36  void tick(float dt);
37
38  void debug(void) const;
39
40 private:
41  PhysicsEngine(void);
42  static PhysicsEngine* singletonRef;      //!< the singleton reference of the PhysicsEngine
43
44  tList<PhysicsInterface>* interfaces;     //!< a list of physically based objects
45  tList<Field>* fields;                    //!< a list of physicsl fields.
46  tList<PhysicsConnection>* connections;   //!< a list of physical connections
47};
48
49
50
51#endif /* _PHYSICS_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.