mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-04 17:25:30 +01:00
Refactor: Remove obsolete IAnimatedMeshSceneNode interface (#16631)
This commit is contained in:
@@ -18,7 +18,7 @@ struct ItemStack;
|
||||
|
||||
namespace scene
|
||||
{
|
||||
class IAnimatedMeshSceneNode;
|
||||
class AnimatedMeshSceneNode;
|
||||
class ISceneNode;
|
||||
class ISceneManager;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual const v3f getVelocity() const { return v3f(0.0f); } // in BS-space
|
||||
virtual scene::ISceneNode *getSceneNode() const
|
||||
{ return NULL; }
|
||||
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode() const
|
||||
virtual scene::AnimatedMeshSceneNode *getAnimatedMeshSceneNode() const
|
||||
{ return NULL; }
|
||||
virtual bool isLocalPlayer() const { return false; }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <IBillboardSceneNode.h>
|
||||
#include <ICameraSceneNode.h>
|
||||
#include <IMeshManipulator.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include <ISceneNode.h>
|
||||
#include "client/client.h"
|
||||
#include "client/renderingengine.h"
|
||||
@@ -400,7 +400,7 @@ scene::ISceneNode *GenericCAO::getSceneNode() const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
scene::IAnimatedMeshSceneNode *GenericCAO::getAnimatedMeshSceneNode() const
|
||||
scene::AnimatedMeshSceneNode *GenericCAO::getAnimatedMeshSceneNode() const
|
||||
{
|
||||
return m_animated_meshnode;
|
||||
}
|
||||
@@ -1437,7 +1437,7 @@ void GenericCAO::updateAttachments()
|
||||
{
|
||||
parent->updateAttachments();
|
||||
scene::ISceneNode *parent_node = parent->getSceneNode();
|
||||
scene::IAnimatedMeshSceneNode *parent_animated_mesh_node =
|
||||
scene::AnimatedMeshSceneNode *parent_animated_mesh_node =
|
||||
parent->getAnimatedMeshSceneNode();
|
||||
if (parent_animated_mesh_node && !m_attachment_bone.empty()) {
|
||||
parent_node = parent_animated_mesh_node->getJointNode(m_attachment_bone.c_str());
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#include "itemgroup.h"
|
||||
#include "client/tile.h"
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace scene {
|
||||
class IMeshSceneNode;
|
||||
class IBillboardSceneNode;
|
||||
class AnimatedMeshSceneNode;
|
||||
}
|
||||
|
||||
class Client;
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
|
||||
// Visuals
|
||||
scene::IMeshSceneNode *m_meshnode = nullptr;
|
||||
scene::IAnimatedMeshSceneNode *m_animated_meshnode = nullptr;
|
||||
scene::AnimatedMeshSceneNode *m_animated_meshnode = nullptr;
|
||||
WieldMeshSceneNode *m_wield_meshnode = nullptr;
|
||||
scene::IBillboardSceneNode *m_spritenode = nullptr;
|
||||
scene::IDummyTransformationSceneNode *m_matrixnode = nullptr;
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
|
||||
scene::ISceneNode *getSceneNode() const override;
|
||||
|
||||
scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode() const override;
|
||||
scene::AnimatedMeshSceneNode *getAnimatedMeshSceneNode() const override;
|
||||
|
||||
// m_matrixnode controls the position and rotation of the child node
|
||||
// for all scene nodes, as a workaround for an Irrlicht problem with
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "version.h"
|
||||
#include "script/scripting_client.h"
|
||||
#include "hud.h"
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include "util/tracy_wrapper.h"
|
||||
#include "item_visuals_manager.h"
|
||||
|
||||
@@ -2226,7 +2226,7 @@ static void pauseNodeAnimation(PausedNodesList &paused, scene::ISceneNode *node)
|
||||
pauseNodeAnimation(paused, child);
|
||||
if (node->getType() != scene::ESNT_ANIMATED_MESH)
|
||||
return;
|
||||
auto animated_node = static_cast<scene::IAnimatedMeshSceneNode *>(node);
|
||||
auto animated_node = static_cast<scene::AnimatedMeshSceneNode *>(node);
|
||||
float speed = animated_node->getAnimationSpeed();
|
||||
if (!speed)
|
||||
return;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "game.h"
|
||||
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include "camera.h"
|
||||
@@ -83,7 +83,7 @@ struct ClientEventHandler
|
||||
void (Game::*handler)(ClientEvent *, CameraOrientation *);
|
||||
};
|
||||
|
||||
using PausedNodesList = std::vector<std::pair<irr_ptr<scene::IAnimatedMeshSceneNode>, float>>;
|
||||
using PausedNodesList = std::vector<std::pair<irr_ptr<scene::AnimatedMeshSceneNode>, float>>;
|
||||
|
||||
/* This is not intended to be a public class. If a public class becomes
|
||||
* desirable then it may be better to create another 'wrapper' class that
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
#include "debug.h"
|
||||
#include "log.h"
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <IAnimatedMesh.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include "S3DVertex.h"
|
||||
#include <SMesh.h>
|
||||
#include "CMeshBuffer.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <IGUIFont.h>
|
||||
#include <IGUITabControl.h>
|
||||
#include <IGUIImage.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include "client/renderingengine.h"
|
||||
#include "client/joystick_controller.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "guiScene.h"
|
||||
|
||||
#include <SViewFrustum.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include <ISceneManager.h>
|
||||
#include "porting.h"
|
||||
@@ -29,7 +29,7 @@ GUIScene::~GUIScene()
|
||||
m_smgr->drop();
|
||||
}
|
||||
|
||||
scene::IAnimatedMeshSceneNode *GUIScene::setMesh(scene::IAnimatedMesh *mesh)
|
||||
scene::AnimatedMeshSceneNode *GUIScene::setMesh(scene::IAnimatedMesh *mesh)
|
||||
{
|
||||
if (m_mesh) {
|
||||
m_mesh->remove();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "ICameraSceneNode.h"
|
||||
#include "StyleSpec.h"
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <AnimatedMeshSceneNode.h>
|
||||
#include <IGUIElement.h>
|
||||
#include <IGUIEnvironment.h>
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
|
||||
~GUIScene();
|
||||
|
||||
scene::IAnimatedMeshSceneNode *setMesh(scene::IAnimatedMesh *mesh = nullptr);
|
||||
scene::AnimatedMeshSceneNode *setMesh(scene::IAnimatedMesh *mesh = nullptr);
|
||||
void setTexture(u32 idx, video::ITexture *texture);
|
||||
void setBackgroundColor(const video::SColor &color) noexcept { m_bgcolor = color; };
|
||||
void setFrameLoop(f32 begin, f32 end);
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
video::IVideoDriver *m_driver;
|
||||
scene::ICameraSceneNode *m_cam;
|
||||
scene::ISceneNode *m_target = nullptr;
|
||||
scene::IAnimatedMeshSceneNode *m_mesh = nullptr;
|
||||
scene::AnimatedMeshSceneNode *m_mesh = nullptr;
|
||||
|
||||
f32 m_cam_distance = 50.f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user