Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2008, 11:16:49 PM (16 years ago)
Author:
rgrieder
Message:

Author issues with copy & paste…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/objects/worldentities/WorldEntity.cc

    r2303 r2304  
    2222 *   Author:
    2323 *      Fabian 'x3n' Landau
     24 *      Reto Grieder (physics)
    2425 *   Co-authors:
    2526 *      ...
     
    394395    }
    395396
    396     //void WorldEntity::setCollisionRadius(float radius)
    397     //{
    398     //    if (!checkPhysics())
    399     //        return;
    400 
    401     //    // destroy old one first
    402     //    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     //    //else
    418     //    this->physicalBody_->setCollisionShape(new btSphereShape(btScalar(radius)));
    419     //}
    420 
    421     //float WorldEntity::getCollisionRadius() const
    422     //{
    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 
    432397    bool WorldEntity::checkPhysics() const
    433398    {
Note: See TracChangeset for help on using the changeset viewer.