Changeset 2491 for code/branches/presentation/src/orxonox/objects
- Timestamp:
- Dec 17, 2008, 12:10:23 AM (16 years ago)
- Location:
- code/branches/presentation/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/Scene.cc
r2485 r2491 117 117 XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true); 118 118 119 XMLPortParam(Scene, "gravity", setGravity, getGravity, xmlelement, mode); 119 120 XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode); 120 121 XMLPortParam(Scene, "positiveWorldRange", setPositiveWorldRange, getPositiveWorldRange, xmlelement, mode); … … 191 192 this->collisionConfig_ = new btDefaultCollisionConfiguration(); 192 193 this->dispatcher_ = new btCollisionDispatcher(this->collisionConfig_); 193 this->solver_ = new btSequentialImpulseConstraintSolver ;194 this->solver_ = new btSequentialImpulseConstraintSolver(); 194 195 195 196 this->physicalWorld_ = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_); -
code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.cc
r2485 r2491 64 64 65 65 XMLPortParamTemplate(MobileEntity, "velocity", setVelocity, getVelocity, xmlelement, mode, const Vector3&); 66 XMLPortParamTemplate(MobileEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&); 67 XMLPortParam(MobileEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode); 66 67 Vector3 rotationAxis(this->getRotationAxis()); 68 Degree rotationRate = this->getRotationRate(); 69 XMLPortParamVariable(MobileEntity, "rotationaxis", rotationAxis, xmlelement, mode); 70 XMLPortParamVariable(MobileEntity, "rotationrate", rotationRate, xmlelement, mode); 71 if (mode == XMLPort::LoadObject) 72 { 73 if (rotationAxis == Vector3::ZERO) 74 this->setAngularVelocity(Vector3::ZERO); 75 else 76 this->setAngularVelocity(rotationAxis.normalisedCopy() * rotationRate.valueRadians()); 77 } 68 78 } 69 79
Note: See TracChangeset
for help on using the changeset viewer.