Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2008, 12:45:19 AM (17 years ago)
Author:
rgrieder
Message:

Clarified use of different physical bodies. The "collisionType" XML attribute of WE specifies the following:
"none": There is not physical body at all. Physics disabled.
"static": It is a StaticEntity with physics. Any other derived class of WE issues an exception by choosing this collision type.
"kinematic" or "dynamic": MovableEntity with physics. StaticEntity issues an exception when choosing one of these two.

Added two new Exceptions: ParseError and PhysicsViolation.

File:
1 edited

Legend:

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

    r2292 r2298  
    301301            this->node_->setDirection(direction, relativeTo, localDirectionVector);
    302302        }
     303    }
     304
     305    bool MovableEntity::isCollisionTypeLegal(WorldEntity::CollisionType type)
     306    {
     307        if (type == WorldEntity::Static)
     308        {
     309            ThrowException(PhysicsViolation, "Cannot tell a MovableEntity to have static collision type");
     310            return false;
     311        }
     312        else
     313            return true;
    303314    }
    304315
Note: See TracChangeset for help on using the changeset viewer.