Changeset 4186 in orxonox.OLD for orxonox/branches/physics/src/util
- Timestamp:
- May 14, 2005, 10:57:14 PM (20 years ago)
- Location:
- orxonox/branches/physics/src/util/physics
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/util/physics/fields/field.h
r4180 r4186 39 39 40 40 /** 41 \param dt The time over which to apply the force 41 42 \param data This is the data given to this force, to calculate the ForceVector 42 43 \returns The Force Vector 43 44 */ 44 virtual Vector calcForce( const Vector& data) const = 0;45 virtual Vector calcForce(float dt, const Vector& data) const = 0; 45 46 46 47 void setMagnitude(const float& magnitude); -
orxonox/branches/physics/src/util/physics/fields/gravity.cc
r4180 r4186 45 45 \returns The force. 46 46 */ 47 Vector Gravity::calcForce( const Vector& data) const47 Vector Gravity::calcForce(float dt, const Vector& data) const 48 48 { 49 return /*(this->getAbsDir().apply(Vector(0,1,0)))*/ Vector(0,-1,0) * this->getMagnitude() ;49 return /*(this->getAbsDir().apply(Vector(0,1,0)))*/ Vector(0,-1,0) * this->getMagnitude() * dt; 50 50 } 51 51 -
orxonox/branches/physics/src/util/physics/fields/gravity.h
r4180 r4186 21 21 virtual ~Gravity(); 22 22 23 virtual Vector calcForce( const Vector& data) const;23 virtual Vector calcForce(float dt, const Vector& data) const; 24 24 25 25 private: -
orxonox/branches/physics/src/util/physics/fields/point_gravity.cc
r4184 r4186 45 45 \returns The force. 46 46 */ 47 Vector PointGravity::calcForce( const Vector& data) const47 Vector PointGravity::calcForce(float dt, const Vector& data) const 48 48 { 49 return (this->getAbsCoor() - data) * this->getMagnitude() ;49 return (this->getAbsCoor() - data) * this->getMagnitude() * dt; 50 50 } 51 51 -
orxonox/branches/physics/src/util/physics/fields/point_gravity.h
r4184 r4186 21 21 virtual ~PointGravity(); 22 22 23 virtual Vector calcForce( const Vector& data) const;23 virtual Vector calcForce(float dt, const Vector& data) const; 24 24 25 25 private: -
orxonox/branches/physics/src/util/physics/fields/twirl.cc
r4184 r4186 45 45 \returns The force. 46 46 */ 47 Vector Twirl::calcForce( const Vector& data) const47 Vector Twirl::calcForce(float dt, const Vector& data) const 48 48 { 49 49 return /*this->getAbsDir()*/ Vector(0,1,0).cross(this->getAbsCoor() - data) 50 * this->getMagnitude() ;50 * this->getMagnitude() * dt; 51 51 } 52 52 -
orxonox/branches/physics/src/util/physics/fields/twirl.h
r4184 r4186 21 21 virtual ~Twirl(); 22 22 23 virtual Vector calcForce( const Vector& data) const;23 virtual Vector calcForce(float dt, const Vector& data) const; 24 24 25 25 private: -
orxonox/branches/physics/src/util/physics/physics_connection.cc
r4183 r4186 45 45 /** 46 46 \brief applies the Force to some Object. 47 \param dt The time to apply in Seconds 47 48 */ 48 void PhysicsConnection::apply( void) const49 void PhysicsConnection::apply(const float& dt) const 49 50 { 50 51 switch(this->type) … … 55 56 56 57 case PCON_ParticlesField: 57 this->particleSystem->applyField( this->field);58 this->particleSystem->applyField(dt, this->field); 58 59 59 60 break; -
orxonox/branches/physics/src/util/physics/physics_connection.h
r4183 r4186 29 29 virtual ~PhysicsConnection(); 30 30 31 void apply( void) const;31 void apply(const float& dt) const; 32 32 33 33 private: -
orxonox/branches/physics/src/util/physics/physics_engine.cc
r4183 r4186 95 95 while (enumConn) 96 96 { 97 enumConn->apply( );97 enumConn->apply(dt); 98 98 enumConn = iterator->nextElement(); 99 99 }
Note: See TracChangeset
for help on using the changeset viewer.