STKMesh: Add an animated variant
Not customised atm.
This commit is contained in:
parent
2bfdfc0373
commit
9a5bf69ca8
@ -60,6 +60,7 @@ src/graphics/show_curve.cpp
|
|||||||
src/graphics/skid_marks.cpp
|
src/graphics/skid_marks.cpp
|
||||||
src/graphics/slip_stream.cpp
|
src/graphics/slip_stream.cpp
|
||||||
src/graphics/stars.cpp
|
src/graphics/stars.cpp
|
||||||
|
src/graphics/stkanimatedmesh.cpp
|
||||||
src/graphics/stkmesh.cpp
|
src/graphics/stkmesh.cpp
|
||||||
src/graphics/sun.cpp
|
src/graphics/sun.cpp
|
||||||
src/graphics/water.cpp
|
src/graphics/water.cpp
|
||||||
@ -387,6 +388,7 @@ src/graphics/show_curve.hpp
|
|||||||
src/graphics/skid_marks.hpp
|
src/graphics/skid_marks.hpp
|
||||||
src/graphics/slip_stream.hpp
|
src/graphics/slip_stream.hpp
|
||||||
src/graphics/stars.hpp
|
src/graphics/stars.hpp
|
||||||
|
src/graphics/stkanimatedmesh.hpp
|
||||||
src/graphics/stkmesh.hpp
|
src/graphics/stkmesh.hpp
|
||||||
src/graphics/sun.hpp
|
src/graphics/sun.hpp
|
||||||
src/graphics/water.hpp
|
src/graphics/water.hpp
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "graphics/referee.hpp"
|
#include "graphics/referee.hpp"
|
||||||
#include "graphics/shaders.hpp"
|
#include "graphics/shaders.hpp"
|
||||||
#include "graphics/shadow_importance.hpp"
|
#include "graphics/shadow_importance.hpp"
|
||||||
|
#include "graphics/stkanimatedmesh.hpp"
|
||||||
#include "graphics/stkmesh.hpp"
|
#include "graphics/stkmesh.hpp"
|
||||||
#include "graphics/sun.hpp"
|
#include "graphics/sun.hpp"
|
||||||
#include "graphics/rtts.hpp"
|
#include "graphics/rtts.hpp"
|
||||||
@ -1111,11 +1112,19 @@ void IrrDriver::removeTexture(video::ITexture *t)
|
|||||||
*/
|
*/
|
||||||
scene::IAnimatedMeshSceneNode *IrrDriver::addAnimatedMesh(scene::IAnimatedMesh *mesh, scene::ISceneNode* parent)
|
scene::IAnimatedMeshSceneNode *IrrDriver::addAnimatedMesh(scene::IAnimatedMesh *mesh, scene::ISceneNode* parent)
|
||||||
{
|
{
|
||||||
return m_scene_manager->addAnimatedMeshSceneNode(mesh, parent, -1,
|
if (!isGLSL())
|
||||||
|
return m_scene_manager->addAnimatedMeshSceneNode(mesh, parent, -1,
|
||||||
core::vector3df(0,0,0),
|
core::vector3df(0,0,0),
|
||||||
core::vector3df(0,0,0),
|
core::vector3df(0,0,0),
|
||||||
core::vector3df(1,1,1),
|
core::vector3df(1,1,1),
|
||||||
/*addIfMeshIsZero*/true);
|
/*addIfMeshIsZero*/true);
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
parent = m_scene_manager->getRootSceneNode();
|
||||||
|
scene::IAnimatedMeshSceneNode* node =
|
||||||
|
new STKAnimatedMesh(mesh, parent, m_scene_manager, -1, core::vector3df(0,0,0), core::vector3df(0,0,0), core::vector3df(1,1,1));
|
||||||
|
node->drop();
|
||||||
|
return node;
|
||||||
} // addAnimatedMesh
|
} // addAnimatedMesh
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
17
src/graphics/stkanimatedmesh.cpp
Normal file
17
src/graphics/stkanimatedmesh.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "graphics/stkanimatedmesh.hpp"
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
|
||||||
|
STKAnimatedMesh::STKAnimatedMesh(irr::scene::IAnimatedMesh* mesh, irr::scene::ISceneNode* parent,
|
||||||
|
irr::scene::ISceneManager* mgr, s32 id,
|
||||||
|
const core::vector3df& position,
|
||||||
|
const core::vector3df& rotation,
|
||||||
|
const core::vector3df& scale) :
|
||||||
|
CAnimatedMeshSceneNode(mesh, parent, mgr, id, position, rotation, scale)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void STKAnimatedMesh::render()
|
||||||
|
{
|
||||||
|
CAnimatedMeshSceneNode::render();
|
||||||
|
}
|
19
src/graphics/stkanimatedmesh.hpp
Normal file
19
src/graphics/stkanimatedmesh.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef STKANIMATEDMESH_HPP
|
||||||
|
#define STKANIMATEDMESH_HPP
|
||||||
|
|
||||||
|
#include "../lib/irrlicht/source/Irrlicht/CAnimatedMeshSceneNode.h"
|
||||||
|
#include <IAnimatedMesh.h>
|
||||||
|
#include <irrTypes.h>
|
||||||
|
|
||||||
|
class STKAnimatedMesh : public irr::scene::CAnimatedMeshSceneNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
STKAnimatedMesh(irr::scene::IAnimatedMesh* mesh, irr::scene::ISceneNode* parent,
|
||||||
|
irr::scene::ISceneManager* mgr, irr::s32 id,
|
||||||
|
const irr::core::vector3df& position = irr::core::vector3df(0,0,0),
|
||||||
|
const irr::core::vector3df& rotation = irr::core::vector3df(0,0,0),
|
||||||
|
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f));
|
||||||
|
virtual void render();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // STKANIMATEDMESH_HPP
|
Loading…
Reference in New Issue
Block a user