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/MovableEntity.h

    r2201 r2292  
    6969
    7070        private:
    71 
    72             virtual void rollChanged() { }
    73             virtual void positionChanged() { }
    74             virtual void translateChanged() { }
    75             virtual void orientationChanged() { }
    76             virtual void rotateChanged() { }
    77             virtual void yawChanged() { }
    78             virtual void pitchChanged() { }
    79             virtual void lookAtChanged() { }
    80             virtual void directionChanged( ) { }
    81 
    8271            //void attachPhysicalObject(WorldEntity* object);
    8372
    84             //// Bullet btMotionState related
    85             //void setWorldTransform(const btTransform& worldTrans)
    86             //{
    87             //    this->node_->setPosition(worldTrans.getOrigin().x(), worldTrans.getOrigin().y(), worldTrans.getOrigin().z());
    88             //    this->node_->setOrientation(worldTrans.getRotation().w(), worldTrans.getRotation().x(), worldTrans.getRotation().y(), worldTrans.getRotation().z());
    89             //    //this->velocity_.x = this->physicalBody_->
    90             //}
     73            virtual void internalSetVelocity(const Vector3& velocity) { }
     74            virtual void positionChanged() { }
     75            virtual void orientationChanged() { }
    9176
    92             //// Bullet btMotionState related
    93             //void getWorldTransform(btTransform& worldTrans) const
    94             //{
    95             //    worldTrans.setOrigin(btVector3(node_->getPosition().x, node_->getPosition().y, node_->getPosition().z));
    96             //    worldTrans.setRotation(btQuaternion(node_->getOrientation().w, node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z));
    97             //}
     77            // Bullet btMotionState related
     78            void setWorldTransform(const btTransform& worldTrans);
     79            void getWorldTransform(btTransform& worldTrans) const;
    9880    };
    9981}
Note: See TracChangeset for help on using the changeset viewer.