- Timestamp:
- Nov 29, 2008, 12:45:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/StaticEntity.cc
r2292 r2298 60 60 } 61 61 62 void StaticEntity::setCollisionType(CollisionType type)62 bool StaticEntity::isCollisionTypeLegal(WorldEntity::CollisionType type) 63 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); 64 if (type == WorldEntity::Static) 65 { 66 ThrowException(PhysicsViolation, "Cannot tell a MovableEntity to have static collision type"); 67 return false; 68 } 69 else 70 return true; 70 71 } 71 72
Note: See TracChangeset
for help on using the changeset viewer.