Changeset 4597 in orxonox.OLD for orxonox/trunk/src/lib/physics
- Timestamp:
- Jun 11, 2005, 12:55:48 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/physics
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/physics/physics_connection.cc
r4480 r4597 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 31 31 PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field) 32 32 { 33 this->setClassID(CL_PHYSICS_CONNECTION, "PhysicsConnection"); 33 34 this->type = PCON_PhysIField; 34 35 this->subject = subject; … … 43 44 44 45 */ 45 PhysicsConnection::~PhysicsConnection () 46 PhysicsConnection::~PhysicsConnection () 46 47 { 47 48 PhysicsEngine::getInstance()->removeConnection(this); 48 49 } 49 50 50 /** 51 /** 51 52 \brief applies the Force to some Object. 52 53 */ -
orxonox/trunk/src/lib/physics/physics_connection.h
r4480 r4597 1 /*! 1 /*! 2 2 \file physics_connection.h 3 3 \brief Definition of The Physical Connection Class. 4 4 */ 5 5 6 #ifndef _PHYSICS_CONNECTION_H 6 #ifndef _PHYSICS_CONNECTION_H 7 7 #define _PHYSICS_CONNECTION_H 8 8 … … 14 14 15 15 //! An enumerator for different ConnectionTypes 16 typedef enum PCON_Type { PCON_PhysIPhysI = 0, 17 PCON_PhysIField = 1}; 16 typedef enum PCON_Type 17 { 18 PCON_PhysIPhysI = 1, 19 PCON_PhysIField = 2 20 }; 18 21 19 22 … … 34 37 private: 35 38 PCON_Type type; //!< What kind of connection this is. 36 39 37 40 PhysicsInterface* subject; //!< The main Subject of this Connection. 38 41 PhysicsInterface* partner2; //!< The second partner of this Connection. 39 42 40 43 Field* field; //!< The field to connect either subject of ParticleSystem to. 41 44 }; -
orxonox/trunk/src/lib/physics/physics_engine.cc
r4558 r4597 30 30 PhysicsEngine::PhysicsEngine() 31 31 { 32 this->setClassName ("PhysicsEngine");33 34 35 36 32 this->setClassID(CL_PHYSICS_ENGINE, "PhysicsEngine"); 33 this->setName("PhysicsEngine"); 34 this->connections = new tList<PhysicsConnection>; 35 this->interfaces = new tList<PhysicsInterface>; 36 this->fields = new tList<Field>; 37 37 } 38 38 -
orxonox/trunk/src/lib/physics/physics_interface.cc
r4558 r4597 35 35 /** 36 36 \brief standard constructor 37 */37 */ 38 38 PhysicsInterface::PhysicsInterface (void* objectPointer) 39 39 { 40 this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface"); 40 41 this->objectPointer = objectPointer; 41 42 42 // this->setClassName ("PhysicsInterface"); 43 this->mass = 1; 44 this->massChildren = 0; 45 this->forceSum = Vector(0, 0, 0); 46 this->bForceApplied = false; 43 this->mass = 1; 44 this->massChildren = 0; 45 this->forceSum = Vector(0, 0, 0); 46 this->bForceApplied = false; 47 47 48 48 PhysicsEngine::getInstance()->addPhysicsInterface(this); -
orxonox/trunk/src/lib/physics/physics_interface.h
r4558 r4597 28 28 class PhysicsInterface : virtual public BaseObject 29 29 { 30 31 30 public: 32 31 PhysicsInterface(void* objectPointer);
Note: See TracChangeset
for help on using the changeset viewer.