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

    r1968 r1989  
    4444        RegisterObject(MovableEntity);
    4545
     46        this->velocity_ = Vector3::ZERO;
     47        this->acceleration_ = Vector3::ZERO;
     48        this->rotationAxis_ = Vector3::ZERO;
     49        this->rotationRate_ = 0;
     50        this->momentum_ = 0;
     51
     52        this->overwrite_position_ = Vector3::ZERO;
     53        this->overwrite_orientation_ = Quaternion::IDENTITY;
     54
    4655        this->registerVariables();
    4756    }
     
    5766        XMLPortParamTemplate(MovableEntity, "velocity", setVelocity, getVelocity, xmlelement, mode, const Vector3&);
    5867        XMLPortParamTemplate(MovableEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&);
    59         XMLPortParamTemplate(MovableEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode, const Radian&);
     68        XMLPortParamTemplate(MovableEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode, const Degree&);
    6069    }
    6170
     
    139148    }
    140149
    141     void MovableEntity::yaw(const Radian& angle, Ogre::Node::TransformSpace relativeTo)
     150    void MovableEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    142151    {
    143152        this->node_->yaw(angle, relativeTo);
     
    145154    }
    146155
    147     void MovableEntity::pitch(const Radian& angle, Ogre::Node::TransformSpace relativeTo)
     156    void MovableEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    148157    {
    149158        this->node_->pitch(angle, relativeTo);
     
    151160    }
    152161
    153     void MovableEntity::roll(const Radian& angle, Ogre::Node::TransformSpace relativeTo)
     162    void MovableEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
    154163    {
    155164        this->node_->roll(angle, relativeTo);
Note: See TracChangeset for help on using the changeset viewer.