Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 1:38:17 PM (17 years ago)
Author:
rgrieder
Message:

Trying to synchronise phyiscs over the network.

  • Removed derivation of CollisionShape from WorldEntity (BaseObject instead).
File:
1 edited

Legend:

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

    r2300 r2374  
    3333
    3434#include "MovableEntity.h"
    35 #include "objects/Tickable.h"
    3635#include "network/ClientConnectionListener.h"
    3736
    3837namespace orxonox
    3938{
    40     class _OrxonoxExport LinearEntity : public MovableEntity, public network::ClientConnectionListener, public Tickable
     39    class _OrxonoxExport LinearEntity : public MovableEntity, public network::ClientConnectionListener
    4140    {
    4241        public:
     
    4847            void registerVariables();
    4948
    50             inline void setAcceleration(const Vector3& acceleration)
    51                 { this->acceleration_ = acceleration; }
    52             inline void setAcceleration(float x, float y, float z)
    53                 { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
    54             inline const Vector3& getAcceleration() const
    55                 { return this->acceleration_; }
    56 
    57             inline void setRotationAxis(const Vector3& axis)
    58                 { this->rotationAxis_ = axis; this->rotationAxis_.normalise(); }
    59             inline void setRotationAxis(float x, float y, float z)
    60                 { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; rotationAxis_.normalise(); }
    61             inline const Vector3& getRotationAxis() const
    62                 { return this->rotationAxis_; }
    63 
    64             inline void setRotationRate(const Degree& angle)
    65                 { this->rotationRate_ = angle; }
    66             inline void setRotationRate(const Radian& angle)
    67                 { this->rotationRate_ = angle; }
    68             inline const Degree& getRotationRate() const
    69                 { return this->rotationRate_; }
    70 
    71             inline void setMomentum(const Degree& angle)
    72                 { this->momentum_ = angle; }
    73             inline void setMomentum(const Radian& angle)
    74                 { this->momentum_ = angle; }
    75             inline const Degree& getMomentum() const
    76                 { return this->momentum_; }
    77 
    7849        private:
    7950            void clientConnected(unsigned int clientID);
     
    8152            void resynchronize();
    8253
     54            inline void processLinearVelocity()
     55                { this->setVelocity(this->linearVelocity_); }
     56            inline void processAngularVelocity()
     57                { this->setAngularVelocity(this->angularVelocity_); }
     58
    8359            void overwritePosition();
    8460            void overwriteOrientation();
    8561
    86             void positionChanged();
    87             void orientationChanged();
    88 
    89             Vector3 acceleration_;
    90             Vector3 rotationAxis_;
    91             Degree rotationRate_;
    92             Degree momentum_;
     62            void positionChanged(bool bContinuous);
     63            void orientationChanged(bool bContinuous);
    9364
    9465            Vector3 overwrite_position_;
Note: See TracChangeset for help on using the changeset viewer.