diff --git a/src/graphics/referee.cpp b/src/graphics/referee.cpp index 5f43993a3..18cc6dd01 100644 --- a/src/graphics/referee.cpp +++ b/src/graphics/referee.cpp @@ -33,6 +33,7 @@ #include "utils/log.hpp" #include "utils/string_utils.hpp" +#include #include int Referee::m_st_first_start_frame = 1; @@ -298,3 +299,25 @@ void Referee::setAnimationFrameWithCreatedTicks(int created_ticks) frame += (float)m_st_first_rescue_frame; m_scene_node->setCurrentFrame(frame); } // setAnimationFrameWithCreatedTicks + +// ---------------------------------------------------------------------------- +/** Moves the referee to the specified position. */ +void Referee::setPosition(const Vec3 &xyz) +{ + m_scene_node->setPosition(xyz.toIrrVector()); +} // setPosition + +// ---------------------------------------------------------------------------- +/** Sets the rotation of the scene node (in degrees). + * \param hpr Rotation in degrees. */ +void Referee::setRotation(const Vec3 &hpr) +{ + m_scene_node->setRotation(hpr.toIrrVector()); +} // setRotation + +// ---------------------------------------------------------------------------- +/** Returns true if this referee is attached to the scene graph. */ +bool Referee::isAttached() const +{ + return m_scene_node->getParent() != NULL; +} // isAttached diff --git a/src/graphics/referee.hpp b/src/graphics/referee.hpp index 5fc2f3e67..476862305 100644 --- a/src/graphics/referee.hpp +++ b/src/graphics/referee.hpp @@ -19,10 +19,18 @@ #ifndef HEADER_REFEREE_HPP #define HEADER_REFEREE_HPP -#include -#include -#include -#include +namespace irr +{ + namespace scene + { + class IAnimatedMesh; class IAnimatedMeshSceneNode; class ISceneNode; + } + namespace video + { + class ITexture; + } +} + using namespace irr; #include "utils/vec3.hpp" @@ -96,17 +104,11 @@ public: /** Returns the scene node of this referee. */ scene::IAnimatedMeshSceneNode* getSceneNode() { return m_scene_node; } // ------------------------------------------------------------------------ - /** Moves the referee to the specified position. */ - void setPosition(const Vec3 &xyz) - {m_scene_node->setPosition(xyz.toIrrVector()); } + void setPosition(const Vec3 &xyz); // ------------------------------------------------------------------------ - /** Sets the rotation of the scene node (in degrees). - * \param hpr Rotation in degrees. */ - void setRotation(const Vec3 &hpr) - { m_scene_node->setRotation(hpr.toIrrVector()); } + void setRotation(const Vec3 &hpr); // ------------------------------------------------------------------------ - /** Returns true if this referee is attached to the scene graph. */ - bool isAttached() const {return m_scene_node->getParent()!=NULL;} + bool isAttached() const; // ------------------------------------------------------------------------ void setAnimationFrameWithCreatedTicks(int created_ticks); // ------------------------------------------------------------------------