Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5067 was 5039, checked in by bensch, 19 years ago

orxonox/trunk: useless stuff :)

File size: 2.0 KB
RevLine 
[4558]1/*!
[5039]2 * @file physics_engine.h
[4836]3  *  Definition of the PhysicsEngine-singleton Class
[4558]4
[3954]5*/
6
[4121]7#ifndef _PHYSICS_ENGINE_H
8#define _PHYSICS_ENGINE_H
[3954]9
10#include "base_object.h"
[4392]11
[4183]12#include "physics_connection.h"
[4392]13#include "physics_interface.h"
[4394]14#include "field.h"
[3954]15
[4183]16// Forward Declaration
17template<class T> class tList;
[4728]18class TiXmlElement;
[3954]19
[4558]20//! A class, that brings things into motion through Physics.
[4121]21class PhysicsEngine : public BaseObject {
[3954]22
23 public:
[4746]24  virtual ~PhysicsEngine();
[4836]25  /** @returns a Pointer to the only object of this Class */
[4746]26  inline static PhysicsEngine* getInstance() { if (!singletonRef) singletonRef = new PhysicsEngine();  return singletonRef; };
[3954]27
[4728]28  void loadParams(const TiXmlElement* root);
[4733]29  void loadFields(const TiXmlElement* root);
30  void loadConnections(const TiXmlElement* root);
[4392]31
[4728]32  void                   addPhysicsInterface(PhysicsInterface* physicsInterface);
33  void                   removePhysicsInterface(PhysicsInterface* physicsInterface);
34  PhysicsInterface*      getPhysicsInterfaceByName(const char* physicsInterfaceName) const;
[4392]35
[4728]36  void                   addField(Field* field);
37  void                   removeField(Field* field);
38  Field*                 getFieldByName(const char* FieldName) const;
[3954]39
[4728]40  void                   addConnection(PhysicsConnection* connection);
41  void                   removeConnection(PhysicsConnection* connection);
42  PhysicsConnection*     getPhysicsConnectionByName(const char* physicsConnectionName) const;
[4183]43
[4378]44
[4728]45  void                   tick(float dt);
46
[4746]47  void                   debug() const;
[4728]48
[3954]49 private:
[4746]50  PhysicsEngine();
[3954]51
[4558]52 private:
53  static PhysicsEngine*         singletonRef;         //!< the singleton reference of the PhysicsEngine
54
55  tList<PhysicsInterface>*      interfaces;           //!< a list of physically based objects
56  tList<Field>*                 fields;               //!< a list of physicsl fields.
57  tList<PhysicsConnection>*     connections;          //!< a list of physical connections
[3954]58};
59
[4183]60
61
[4121]62#endif /* _PHYSICS_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.