- Timestamp:
- Nov 28, 2008, 1:25:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/StaticEntity.cc
r2192 r2292 29 29 #include "OrxonoxStableHeaders.h" 30 30 #include "StaticEntity.h" 31 32 #include "util/Exception.h" 31 33 #include "core/CoreIncludes.h" 32 34 … … 57 59 REGISTERDATA(this->getOrientation().z, network::direction::toclient); 58 60 } 61 62 void StaticEntity::setCollisionType(CollisionType type) 63 { 64 if (!this->physicalBody_) 65 return; 66 if (type != Static) 67 ThrowException(Argument, "Cannot tell a StaticEntity to be kinematic or dynamic"); 68 69 this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_STATIC_OBJECT); 70 } 71 72 void StaticEntity::setWorldTransform(const btTransform& worldTrans) 73 { 74 OrxAssert(false, "Setting world transform of a StaticEntity, which is static!"); 75 //COUT(0) << "Setting world transform of a StaticEntity, which is static!" << std::endl; 76 } 77 78 void StaticEntity::getWorldTransform(btTransform& worldTrans) const 79 { 80 worldTrans.setOrigin(btVector3(node_->getPosition().x, node_->getPosition().y, node_->getPosition().z)); 81 worldTrans.setRotation(btQuaternion(node_->getOrientation().w, node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z)); 82 } 59 83 }
Note: See TracChangeset
for help on using the changeset viewer.