Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 21, 2008, 4:56:41 PM (16 years ago)
Author:
landauf
Message:
  • added ControllableEntity, the baseclass of all players, vehicles and ships.
  • moved Template to core
  • some changes in Camera
  • added 6 constants to WorldEntity to identify relative directions
  • changed vom Radian to Degree as default angle unit
File:
1 edited

Legend:

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

    r1940 r1989  
    5454                { return this->node_; }
    5555
     56            static const Vector3 FRONT;
     57            static const Vector3 BACK;
     58            static const Vector3 LEFT;
     59            static const Vector3 RIGHT;
     60            static const Vector3 DOWN;
     61            static const Vector3 UP;
     62
    5663            virtual void setPosition(const Vector3& position) = 0;
    5764            inline void setPosition(float x, float y, float z)
     
    7178            inline void setOrientation(const Vector3& axis, const Radian& angle)
    7279                { this->setOrientation(Quaternion(angle, axis)); }
     80            inline void setOrientation(const Vector3& axis, const Degree& angle)
     81                { this->setOrientation(Quaternion(angle, axis)); }
    7382            inline const Quaternion& getOrientation() const
    7483                { return this->node_->getOrientation(); }
     
    7786
    7887            virtual void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
     88            inline void rotate(const Vector3& axis, const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
     89                { this->rotate(Quaternion(angle, axis), relativeTo); }
    7990            inline void rotate(const Vector3& axis, const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
    8091                { this->rotate(Quaternion(angle, axis), relativeTo); }
    8192
    82             virtual void yaw(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
    83             virtual void pitch(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
    84             virtual void roll(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
     93            virtual void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
     94            inline void yaw(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
     95                { this->yaw(Degree(angle), relativeTo); }
     96            virtual void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
     97            inline void pitch(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
     98                { this->pitch(Degree(angle), relativeTo); }
     99            virtual void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
     100            inline void roll(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
     101                { this->roll(Degree(angle), relativeTo); }
    85102
    86103            virtual void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z) = 0;
     
    131148            inline void setDirection_xmlport(const Vector3& direction)
    132149                { this->setDirection(direction); }
    133             inline void yaw_xmlport(const Radian& angle)
     150            inline void yaw_xmlport(const Degree& angle)
    134151                { this->yaw(angle); }
    135             inline void pitch_xmlport(const Radian& angle)
     152            inline void pitch_xmlport(const Degree& angle)
    136153                { this->pitch(angle); }
    137             inline void roll_xmlport(const Radian& angle)
     154            inline void roll_xmlport(const Degree& angle)
    138155                { this->roll(angle); }
    139156
Note: See TracChangeset for help on using the changeset viewer.