Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 4:14:36 PM (15 years ago)
Author:
rgrieder
Message:
  • Added detach functions to CollisionShapes
  • Added update functions across the CollisionShape hierarchy so that when you change the radius of a sphere, everything up to the WE gets updated.
  • Setting the btCollisionShape at run time doesn't work after all, fixed that (you can still do it, just a question of internals)
  • Improved network synchronisation
  • new WE function: addedToPhysicalWorld() to check whether we can still perform operations that are disallowed at run time (esp. StaticEntity)

Conclusively, I can say that right now, all operations considering physics should be handled automatically, bugs not withstanding.

File:
1 edited

Legend:

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

    r2374 r2423  
    6060    void StaticEntity::setPosition(const Vector3& position)
    6161    {
    62         if (this->isPhysicsRunning())
     62        if (this->addedToPhysicalWorld())
    6363            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    6464        if (this->isStatic())
     
    7474    void StaticEntity::translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo)
    7575    {
    76         if (this->isPhysicsRunning())
     76        if (this->addedToPhysicalWorld())
    7777            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    7878        if (this->isStatic())
     
    8888    void StaticEntity::setOrientation(const Quaternion& orientation)
    8989    {
    90         if (this->isPhysicsRunning())
     90        if (this->addedToPhysicalWorld())
    9191            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    9292        if (this->isStatic())
     
    102102    void StaticEntity::rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo)
    103103    {
    104         if (this->isPhysicsRunning())
     104        if (this->addedToPhysicalWorld())
    105105            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    106106        if (this->isStatic())
     
    117117    void StaticEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    118118    {
    119         if (this->isPhysicsRunning())
     119        if (this->addedToPhysicalWorld())
    120120            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    121121        if (this->isStatic())
     
    133133    void StaticEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    134134    {
    135         if (this->isPhysicsRunning())
     135        if (this->addedToPhysicalWorld())
    136136            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    137137        if (this->isStatic())
     
    149149    void StaticEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    150150    {
    151         if (this->isPhysicsRunning())
     151        if (this->addedToPhysicalWorld())
    152152            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    153153        if (this->isStatic())
     
    165165    void StaticEntity::lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
    166166    {
    167         if (this->isPhysicsRunning())
     167        if (this->addedToPhysicalWorld())
    168168            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    169169        if (this->isStatic())
     
    179179    void StaticEntity::setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
    180180    {
    181         if (this->isPhysicsRunning())
     181        if (this->addedToPhysicalWorld())
    182182            ThrowException(PhysicsViolation, "Cannot change position or orientation of a StaticEntity with physics at run time.");
    183183        if (this->isStatic())
Note: See TracChangeset for help on using the changeset viewer.