Remove irrlicht headers in referee.hpp

This commit is contained in:
Benau 2022-11-18 10:36:13 +08:00
parent f522e4c72f
commit b77333749c
2 changed files with 38 additions and 13 deletions

View File

@ -33,6 +33,7 @@
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <ISceneManager.h>
#include <ITexture.h>
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

View File

@ -19,10 +19,18 @@
#ifndef HEADER_REFEREE_HPP
#define HEADER_REFEREE_HPP
#include <ISceneNode.h>
#include <IAnimatedMeshSceneNode.h>
#include <ISceneManager.h>
#include <IMeshManipulator.h>
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);
// ------------------------------------------------------------------------