Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 28, 2008, 1:25:16 AM (15 years ago)
Author:
rgrieder
Message:

Finally managed to work out some physics. According to my tests, collisions with simple spheres should work with dynamic/kinematic/static objects. There are currently only a limited number of XML parameters, but we're surely going to extend that. Furthermore there is some more thinking to be done concerning changes of btRigidBody properties when it's already added to the world.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/objects/worldentities/LinearEntity.h

    r2192 r2292  
    3838namespace orxonox
    3939{
    40     class _OrxonoxExport LinearEntity : public MovableEntity, public network::ClientConnectionListener
     40    class _OrxonoxExport LinearEntity : public MovableEntity, public network::ClientConnectionListener, public Tickable
    4141    {
    4242        public:
     
    4848            void registerVariables();
    4949
    50             using WorldEntity::setPosition;
    51             using WorldEntity::translate;
    52             using WorldEntity::setOrientation;
    53             using WorldEntity::rotate;
    54             using WorldEntity::yaw;
    55             using WorldEntity::pitch;
    56             using WorldEntity::roll;
    57             using WorldEntity::lookAt;
    58             using WorldEntity::setDirection;
    59 
    60             void setPosition(const Vector3& position);
    61             void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    62             void setOrientation(const Quaternion& orientation);
    63             void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    64             void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    65             void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    66             void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    67             void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    68             void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    69 
    70             inline void setVelocity(const Vector3& velocity)
    71                 { this->velocity_ = velocity; }
     50            inline void setVelocity(const Vector3& velocity);
    7251            inline void setVelocity(float x, float y, float z)
    7352                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
     
    11190            void overwriteOrientation();
    11291
     92            void positionChanged();
     93            void orientationChanged();
     94            inline void internalSetVelocity(const Vector3& velocity)
     95                { this->velocity_ = velocity; }
     96
    11397            Vector3 velocity_;
    11498            Vector3 acceleration_;
Note: See TracChangeset for help on using the changeset viewer.