- Timestamp:
- Dec 1, 2008, 11:16:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/WorldEntity.cc
r2303 r2304 22 22 * Author: 23 23 * Fabian 'x3n' Landau 24 * Reto Grieder (physics) 24 25 * Co-authors: 25 26 * ... … … 394 395 } 395 396 396 //void WorldEntity::setCollisionRadius(float radius)397 //{398 // if (!checkPhysics())399 // return;400 401 // // destroy old one first402 // btCollisionShape* oldShape = this->physicalBody_->getCollisionShape();403 // if (oldShape)404 // delete oldShape;405 406 // //if (this->getName() == "blubb")407 // //{408 // // btCompoundShape* cShape = new btCompoundShape();409 // // cShape->setLocalScaling(btVector3(1,1,1));410 // // btTransform offset(btQuaternion(0, 0, 0), btVector3(0, 0, 0));411 // // offset.setBasis(btMatrix3x3(3, 0, 0, 0, 3, 0, 0, 0, 3));412 // // btSphereShape* sphere = new btSphereShape(radius);413 // // sphere->setLocalScaling(btVector3(1,1,3));414 // // cShape->addChildShape(offset, sphere);415 // // this->physicalBody_->setCollisionShape(cShape);416 // //}417 // //else418 // this->physicalBody_->setCollisionShape(new btSphereShape(btScalar(radius)));419 //}420 421 //float WorldEntity::getCollisionRadius() const422 //{423 // if (checkPhysics())424 // {425 // btSphereShape* sphere = dynamic_cast<btSphereShape*>(this->physicalBody_->getCollisionShape());426 // if (sphere)427 // return (float)sphere->getRadius();428 // }429 // return 0.0f;430 //}431 432 397 bool WorldEntity::checkPhysics() const 433 398 {
Note: See TracChangeset
for help on using the changeset viewer.