Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 3:39:17 PM (16 years ago)
Author:
landauf
Message:

added Mesh and Model (doesn't work yet, but i don't want to have merge conflicts all the time :P)

File:
1 edited

Legend:

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

    r567 r576  
    77#include "OgreSceneManager.h"
    88#include "OgreSceneNode.h"
     9#include "Mesh.h"
    910#include "network/Synchronisable.h"
    1011
     
    4546          { this->node_->roll(angle, relativeTo); }
    4647
     48      inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
     49        { this->node_->rotate(axis, angle, relativeTo); }
     50      inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
     51        { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
     52      inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
     53        { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
     54      inline void setOrientation(const Ogre::Quaternion quat)
     55        { this->node_->setOrientation(quat); }
     56      inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
     57        { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
    4758
    48       inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
    49           { this->node_->rotate(axis, angle, relativeTo); }
    50       inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
    51           { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
    52       inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
    53           { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
    54       inline void setOrientation(const Ogre::Quaternion quat)
    55           { this->node_->setOrientation(quat); }
    56       inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
    57           { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
     59      inline void setScale(const Vector3 &scale)
     60        { this->node_->setScale(scale); }
     61      inline void setScale(Real x, Real y, Real z)
     62        { this->node_->setScale(x, y, z); }
     63      inline void setScale(Real scale)
     64        { this->node_->setScale(scale, scale, scale); }
     65      inline const Vector3& getScale(void) const
     66        { return this->node_->getScale(); }
     67      inline void scale(const Vector3 &scale)
     68        { this->node_->scale(scale); }
     69      inline void scale(Real x, Real y, Real z)
     70        { this->node_->scale(x, y, z); }
     71      inline void scale(Real scale)
     72        { this->node_->scale(scale, scale, scale); }
    5873
    5974      inline void attachObject(Ogre::MovableObject *obj)
    60           { this->node_->attachObject(obj); }
     75        { std::cout << "gux_1" << this->node_ << "\n"; this->node_->attachObject(obj); std::cout << "gux_2\n"; }
     76      inline void attachObject(Mesh &mesh)
     77        { std::cout << "gux_3" << this->node_ << "\n"; this->node_->attachObject((Ogre::MovableObject*)(mesh.getEntity())); std::cout << "gux_4\n"; }
    6178      inline void detachObject(Ogre::MovableObject *obj)
    62           { this->node_->detachObject(obj); }
     79        { this->node_->detachObject(obj); }
    6380      inline void detachAllObjects()
    64           { this->node_->detachAllObjects(); }
     81        { this->node_->detachAllObjects(); }
    6582
    6683      inline void setVelocity(const Vector3& velocity)
     
    100117      inline const Ogre::Quaternion& getOrientation()
    101118          { return this->node_->getOrientation(); }
    102      
     119
    103120    protected:
    104121      void registerAllVariables();
    105      
     122
    106123    private:
    107124      Ogre::SceneNode* node_;
Note: See TracChangeset for help on using the changeset viewer.