Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2007, 3:11:44 PM (16 years ago)
Author:
landauf
Message:

added acceleration, rotationRate and momentum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/WorldEntity.h

    r460 r472  
    6060                { this->node_->detachAllObjects(); }
    6161
     62            inline void setVelocity(const Vector3& velocity)
     63                { this->velocity_ = velocity; }
     64            inline void setVelocity(Real x, Real y, Real z)
     65                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
     66            inline const Vector3& getVelocity() const
     67                { return this->velocity_; }
     68
     69            inline void setAcceleration(const Vector3& acceleration)
     70                { this->acceleration_ = acceleration; }
     71            inline void setAcceleration(Real x, Real y, Real z)
     72                { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
     73            inline const Vector3& getAcceleration() const
     74                { return this->acceleration_; }
     75
     76            inline void setRotationAxis(const Vector3& axis)
     77                { this->rotationAxis_ = axis; }
     78            inline void setRotationAxis(Real x, Real y, Real z)
     79                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
     80            inline const Vector3& getRotationAxis() const
     81                { return this->rotationAxis_; }
     82
     83            inline void setRotationRate(const Radian& angle)
     84                { this->rotationRate_ = angle; }
     85            inline void setRotationRate(const Degree& angle)
     86                { this->rotationRate_ = angle; }
     87            inline const Radian& getRotationRate() const
     88                { return this->rotationRate_; }
     89
     90            inline void setMomentum(const Radian& angle)
     91                { this->momentum_ = angle; }
     92            inline void setMomentum(const Degree& angle)
     93                { this->momentum_ = angle; }
     94            inline const Radian& getMomentum() const
     95                { return this->momentum_; }
     96
     97
    6298            static Ogre::SceneManager* sceneManager_s;
    6399            static int num_s;
     
    69105            bool bStatic_;
    70106            Vector3 velocity_;
     107            Vector3 acceleration_;
     108            Vector3 rotationAxis_;
     109            Radian rotationRate_;
     110            Radian momentum_;
    71111    };
    72112}
Note: See TracChangeset for help on using the changeset viewer.