Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 8:55:40 PM (15 years ago)
Author:
rgrieder
Message:
  • Handled translate, rotate, yaw, pitch, roll, lookAt and setDirection internally in WE. That only leaves setPosition and setOrientation to be pure virtual.
  • Removed loads of redundant and now obsolete code in MobileEntity and StaticEntity
  • Removed OgreSceneNode.h from WorldEntity in debug builds. getPosition, getOrientation and getScale3D are only inline in release mode. That should speed up dev builds a lot (the include is about 8300 line without Vector3, Quaternion, etc.)

Important:

  • Fixed a bug or introduced one: the lookAt(…) function in WE had default TransformSpace "TS_LOCAL", but that makes no sense the way I see it. Consider a SpaceShip and you would like it to face an asteroid. Then TS_LOCAL would yield weird results. The XMLPort attribute "lookAt" used the default value. That's where the bug might have been fixed or (I don't believe so) introduced.
File:
1 edited

Legend:

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

    r2408 r2426  
    4848
    4949            using WorldEntity::setPosition;
    50             using WorldEntity::translate;
    5150            using WorldEntity::setOrientation;
    52             using WorldEntity::rotate;
    53             using WorldEntity::yaw;
    54             using WorldEntity::pitch;
    55             using WorldEntity::roll;
    56             using WorldEntity::lookAt;
    57             using WorldEntity::setDirection;
    5851
    5952            void setPosition(const Vector3& position);
    60             void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    6153            void setOrientation(const Quaternion& orientation);
    62             void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    63             void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    64             void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    65             void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
    66             void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    67             void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    6854
    6955            void setVelocity(const Vector3& velocity);
Note: See TracChangeset for help on using the changeset viewer.