- Timestamp:
- Dec 13, 2008, 4:14:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/StaticEntity.cc
r2374 r2423 60 60 void StaticEntity::setPosition(const Vector3& position) 61 61 { 62 if (this-> isPhysicsRunning())62 if (this->addedToPhysicalWorld()) 63 63 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 64 64 if (this->isStatic()) … … 74 74 void StaticEntity::translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo) 75 75 { 76 if (this-> isPhysicsRunning())76 if (this->addedToPhysicalWorld()) 77 77 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 78 78 if (this->isStatic()) … … 88 88 void StaticEntity::setOrientation(const Quaternion& orientation) 89 89 { 90 if (this-> isPhysicsRunning())90 if (this->addedToPhysicalWorld()) 91 91 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 92 92 if (this->isStatic()) … … 102 102 void StaticEntity::rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo) 103 103 { 104 if (this-> isPhysicsRunning())104 if (this->addedToPhysicalWorld()) 105 105 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 106 106 if (this->isStatic()) … … 117 117 void StaticEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 118 118 { 119 if (this-> isPhysicsRunning())119 if (this->addedToPhysicalWorld()) 120 120 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 121 121 if (this->isStatic()) … … 133 133 void StaticEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 134 134 { 135 if (this-> isPhysicsRunning())135 if (this->addedToPhysicalWorld()) 136 136 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 137 137 if (this->isStatic()) … … 149 149 void StaticEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 150 150 { 151 if (this-> isPhysicsRunning())151 if (this->addedToPhysicalWorld()) 152 152 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 153 153 if (this->isStatic()) … … 165 165 void StaticEntity::lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector) 166 166 { 167 if (this-> isPhysicsRunning())167 if (this->addedToPhysicalWorld()) 168 168 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 169 169 if (this->isStatic()) … … 179 179 void StaticEntity::setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector) 180 180 { 181 if (this-> isPhysicsRunning())181 if (this->addedToPhysicalWorld()) 182 182 ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time."); 183 183 if (this->isStatic())
Note: See TracChangeset
for help on using the changeset viewer.