aboutsummaryrefslogtreecommitdiff
path: root/src/drawscene.cpp
diff options
context:
space:
mode:
authorShadowNinja <ShadowNinja@users.noreply.github.com>2017-06-03 17:59:17 -0400
committerSmallJoker <mk939@ymail.com>2018-06-03 17:31:59 +0200
commitcba783f7faf517cb747177b2854567de5604c65d (patch)
tree4ed916dfbdf4cd875865c793e0c01fd4df320f65 /src/drawscene.cpp
parent87b94518207381da10344d9fe08269687da36de5 (diff)
downloadminetest-cba783f7faf517cb747177b2854567de5604c65d.tar.gz
minetest-cba783f7faf517cb747177b2854567de5604c65d.tar.bz2
minetest-cba783f7faf517cb747177b2854567de5604c65d.zip
Fix segmentation fault with tool capabilities (#5899)
Diffstat (limited to 'src/drawscene.cpp')
0 files changed, 0 insertions, 0 deletions
_HEADER #define WIELDMESH_HEADER #include "irrlichttypes_extrabloated.h" #include <string> struct ItemStack; class IGameDef; class ITextureSource; struct TileSpec; /* Wield item scene node, renders the wield mesh of some item */ class WieldMeshSceneNode: public scene::ISceneNode { public: WieldMeshSceneNode(scene::ISceneNode *parent, scene::ISceneManager *mgr, s32 id = -1, bool lighting = false); virtual ~WieldMeshSceneNode(); void setCube(const TileSpec tiles[6], v3f wield_scale, ITextureSource *tsrc); void setExtruded(const std::string &imagename, v3f wield_scale, ITextureSource *tsrc, u8 num_frames); void setItem(const ItemStack &item, IGameDef *gamedef); // Sets the vertex color of the wield mesh. // Must only be used if the constructor was called with lighting = false void setColor(video::SColor color); scene::IMesh *getMesh() { return m_meshnode->getMesh(); } virtual void render(); virtual const core::aabbox3d<f32>& getBoundingBox() const { return m_bounding_box; } private: void changeToMesh(scene::IMesh *mesh); // Child scene node with the current wield mesh scene::IMeshSceneNode *m_meshnode; video::E_MATERIAL_TYPE m_material_type; // True if EMF_LIGHTING should be enabled. bool m_lighting; bool m_enable_shaders; bool m_anisotropic_filter; bool m_bilinear_filter; bool m_trilinear_filter; // Bounding box culling is disabled for this type of scene node, // so this variable is just required so we can implement // getBoundingBox() and is set to an empty box. core::aabbox3d<f32> m_bounding_box; }; #endif