Changeset 4377 in orxonox.OLD for orxonox/trunk/src/lib/physics
- Timestamp:
- May 29, 2005, 1:24:40 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/physics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/physics/physics_connection.cc
r4375 r4377 28 28 29 29 30 PhysicsConnection::PhysicsConnection(P articleSystem* particleSystem, Field* field)30 PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field) 31 31 { 32 this->type = PCON_P articlesField;33 this-> particleSystem = particleSystem;32 this->type = PCON_PhysIField; 33 this->subject = subject; 34 34 this->field = field; 35 35 … … 59 59 break; 60 60 61 case PCON_ParticlesField:62 this->particleSystem->applyField(dt, this->field);63 64 break;65 66 61 case PCON_PhysIPhysI: 67 62 this->subject->applyField(this->field, dt); 68 63 break; 69 64 } -
orxonox/trunk/src/lib/physics/physics_connection.h
r4375 r4377 14 14 //! An enumerator for different ConnectionTypes 15 15 typedef enum PCON_Type { PCON_PhysIPhysI = 0, 16 PCON_PhysIField = 1, 17 PCON_ParticlesField = 2 }; 16 PCON_PhysIField = 1}; 18 17 19 18 … … 24 23 25 24 public: 25 PhysicsConnection(PhysicsInterface* subject, Field* field); 26 26 PhysicsConnection(PhysicsInterface* partnerOne, PhysicsInterface* partnerTwo); 27 PhysicsConnection(PhysicsInterface* subject, Field* field);28 PhysicsConnection(ParticleSystem* particleSystem, Field* field);29 27 30 28 virtual ~PhysicsConnection(); … … 38 36 PhysicsInterface* partner2; //!< The second partner of this Connection. 39 37 40 ParticleSystem* particleSystem; //!< A ParticleSystem in this Connection41 42 38 Field* field; //!< The field to connect either subject of ParticleSystem to. 43 39 }; -
orxonox/trunk/src/lib/physics/physics_interface.cc
r4376 r4377 22 22 #include "physics_interface.h" 23 23 24 #include "field.h" 24 25 #include "p_node.h" 25 26 … … 84 85 85 86 86 void PhysicsInterface::applyF orce( Vector force)87 void PhysicsInterface::applyField(Field* field, float dt) 87 88 { 88 this->forceSum += force;89 // this->forceSum += force; 89 90 } 90 91 -
orxonox/trunk/src/lib/physics/physics_interface.h
r4376 r4377 8 8 9 9 #include "vector.h" 10 #include "base_object.h" 11 12 // Forward Declaration 13 class Field; 10 14 11 15 //! A Physics interface … … 13 17 here can be some longer description of this class 14 18 */ 15 class PhysicsInterface { 19 class PhysicsInterface : public BaseObject 20 { 16 21 17 22 public: … … 25 30 inline float getTotalMass( void ) const { return mass + massChildren; }; 26 31 27 virtual void applyF orce( Vector force ); //!< Add a central force on this rigid body28 virtual void tickPhys( float dt ); //!< Update kinematics, reset force sum32 virtual void applyField(Field* field, float dt); 33 virtual void tickPhys( float dt ); 29 34 30 35 protected:
Note: See TracChangeset
for help on using the changeset viewer.