- Timestamp:
- Dec 1, 2008, 11:09:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/MovableEntity.cc
r2300 r2303 30 30 #include "MovableEntity.h" 31 31 32 #include "BulletDynamics/Dynamics/btRigidBody.h" 33 32 34 #include "util/Exception.h" 33 35 #include "core/CoreIncludes.h" … … 61 63 { 62 64 } 63 64 //void MovableEntity::setPosition(const Vector3& position)65 //{66 // //if (isDynamic() && bAddedToPhysicalWorld_)67 // //{68 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);69 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);70 // //}71 // this->node_->setPosition(position);72 // positionChanged();73 //}74 75 //void MovableEntity::translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo)76 //{77 // //if (isDynamic() && bAddedToPhysicalWorld_)78 // //{79 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);80 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);81 // //}82 // this->node_->translate(distance, relativeTo);83 // positionChanged();84 //}85 86 //void MovableEntity::setOrientation(const Quaternion& orientation)87 //{88 // //if (isDynamic() && bAddedToPhysicalWorld_)89 // //{90 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);91 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);92 // //}93 // this->node_->setOrientation(orientation);94 // orientationChanged();95 //}96 97 //void MovableEntity::rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo)98 //{99 // //if (isDynamic() && bAddedToPhysicalWorld_)100 // //{101 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);102 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);103 // //}104 // this->node_->rotate(rotation, relativeTo);105 // orientationChanged();106 //}107 108 //void MovableEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo)109 //{110 // //if (isDynamic() && bAddedToPhysicalWorld_)111 // //{112 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);113 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);114 // //}115 // this->node_->yaw(angle, relativeTo);116 // orientationChanged();117 //}118 119 //void MovableEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo)120 //{121 // //if (isDynamic() && bAddedToPhysicalWorld_)122 // //{123 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);124 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);125 // //}126 // this->node_->pitch(angle, relativeTo);127 // orientationChanged();128 //}129 130 //void MovableEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo)131 //{132 // //if (isDynamic() && bAddedToPhysicalWorld_)133 // //{134 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);135 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);136 // //}137 // this->node_->roll(angle, relativeTo);138 // orientationChanged();139 //}140 141 //void MovableEntity::lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)142 //{143 // //if (isDynamic() && bAddedToPhysicalWorld_)144 // //{145 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);146 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);147 // //}148 // this->node_->lookAt(target, relativeTo, localDirectionVector);149 // orientationChanged();150 //}151 152 //void MovableEntity::setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)153 //{154 // //if (isDynamic() && bAddedToPhysicalWorld_)155 // //{156 // // this->getScene()->getPhysicalWorld()->removeRigidBody(this->physicalBody_);157 // // this->getScene()->getPhysicalWorld()->addRigidBody(this->physicalBody_);158 // //}159 // this->node_->setDirection(direction, relativeTo, localDirectionVector);160 // orientationChanged();161 //}162 65 163 66 void MovableEntity::setPosition(const Vector3& position)
Note: See TracChangeset
for help on using the changeset viewer.