Changeset 4396 in orxonox.OLD for orxonox/trunk/src/lib/physics/physics_interface.cc
- Timestamp:
- May 30, 2005, 3:27:36 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/physics/physics_interface.cc
r4395 r4396 39 39 { 40 40 // this->setClassName ("PhysicsInterface"); 41 this->mass = 0;41 this->mass = 1; 42 42 this->massChildren = 0; 43 43 this->forceSum = Vector(0, 0, 0); … … 90 90 void PhysicsInterface::applyField(Field* field) 91 91 { 92 // this->forceSum += force;92 this->forceSum += field->calcForce(dynamic_cast<PNode*>(this)->getAbsCoor()); 93 93 } 94 94 … … 96 96 { 97 97 Vector acc = this->forceSum / ( this->massChildren + this->mass ); 98 PNode* coorTick = (PNode*) this; 99 coorTick->setRelCoor(coorTick->getRelCoor() + (this->forceSum / this->mass * dt)); 100 101 this->forceSum = Vector(0,0,0); 98 102 // todo: introduce kinematics 99 103 }
Note: See TracChangeset
for help on using the changeset viewer.