Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IAnimatedMeshSceneNode.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_ANIMATED_MESH_SCENE_NODE_HPP_INCLUDED
6#define DCPP_I_ANIMATED_MESH_SCENE_NODE_HPP_INCLUDED
7
8#include <duckcpp/core/engine/ISceneNode.hpp>
9#include <duckcpp/core/engine/IBoneSceneNode.hpp>
10#include <duckcpp/core/engine/IAnimatedMeshMD2.hpp>
11#include <duckcpp/core/engine/IAnimatedMeshMD3.hpp>
12
13namespace dcpp
14{
15namespace scene
16{
17 class IShadowVolumeSceneNode;
18
30
31
32 class IAnimatedMeshSceneNode;
33
35
40 {
41 public:
42
44
47 virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0;
48 };
49
52 {
53 public:
54
57 const dcpp::nub::vector3df& position = dcpp::nub::vector3df(0,0,0),
58 const dcpp::nub::vector3df& rotation = dcpp::nub::vector3df(0,0,0),
59 const dcpp::nub::vector3df& scale = dcpp::nub::vector3df(1.0f, 1.0f, 1.0f))
60 : ISceneNode(parent, mgr, id, position, rotation, scale) {}
61
64
66
70 virtual void setCurrentFrame(dcpp::float32_kt frame) = 0;
71
73
81 virtual bool setFrameLoop(dcpp::int32_kt begin, dcpp::int32_kt end) = 0;
82
84
85 virtual void setAnimationSpeed(dcpp::float32_kt framesPerSecond) = 0;
86
88
90
114 dcpp::int32_kt id=-1, bool zfailmethod=true, dcpp::float32_kt infinity=1000.0f) = 0;
115
117
131 virtual IBoneSceneNode* getJointNode(const dcpp::char_kt* jointName)=0;
132
135
137
138 virtual dcpp::uint32_kt getJointCount() const = 0;
139
141
148 virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0;
149
151
163 virtual bool setMD2Animation(const dcpp::char_kt* animationName) = 0;
164
166 virtual dcpp::float32_kt getFrameNr() const = 0;
168 virtual dcpp::int32_kt getStartFrame() const = 0;
170 virtual dcpp::int32_kt getEndFrame() const = 0;
171
173
174 virtual void setLoopMode(bool playAnimationLooped) = 0;
175
177
178 virtual bool getLoopMode() const = 0;
179
181
184 virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0;
185
187
190 virtual void setReadOnlyMaterials(bool readonly) = 0;
191
193 virtual bool isReadOnlyMaterials() const = 0;
194
196 virtual void setMesh(IAnimatedMesh* mesh) = 0;
197
199 virtual IAnimatedMesh* getMesh(void) = 0;
200
202 virtual const SMD3QuaternionTag* getMD3TagTransformation( const dcpp::nub::string & tagname) = 0;
203
206
208
211 virtual void setTransitionTime(dcpp::float32_kt Time) =0;
212
214
215 virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0;
216
218
219 virtual void setRenderFromIdentity( bool On )=0;
220
222
225 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0;
226
227 };
228
229} // end namespace scene
230} // end namespace dcpp
231
232#endif
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
3d vector template class with lots of operators and methods.
Definition vector3d.hpp:32
Scene node capable of displaying an animated mesh.
Definition IAnimatedMeshSceneNode.hpp:52
virtual ~IAnimatedMeshSceneNode()
Destructor.
Definition IAnimatedMeshSceneNode.hpp:63
virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0
Set how the joints should be updated on render.
virtual void setLoopMode(bool playAnimationLooped)=0
Sets looping mode which is on by default.
virtual IBoneSceneNode * getJointNode(dcpp::uint32_kt jointID)=0
same as getJointNode(const dcpp::char_kt* jointName), but based on id
virtual void setRenderFromIdentity(bool On)=0
render mesh ignoring its transformation.
virtual void setMesh(IAnimatedMesh *mesh)=0
Sets a new mesh.
virtual dcpp::float32_kt getAnimationSpeed() const =0
Gets the speed with which the animation is played.
virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim)=0
Starts a default MD2 animation.
virtual void setTransitionTime(dcpp::float32_kt Time)=0
Sets the transition time in seconds.
virtual bool setMD2Animation(const dcpp::char_kt *animationName)=0
Starts a special MD2 animation.
virtual const SMD3QuaternionTag * getMD3TagTransformation(const dcpp::nub::string &tagname)=0
Get the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, or the absolutetrans...
IAnimatedMeshSceneNode(ISceneNode *parent, ISceneManager *mgr, dcpp::int32_kt id, const dcpp::nub::vector3df &position=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &rotation=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &scale=dcpp::nub::vector3df(1.0f, 1.0f, 1.0f))
Constructor.
Definition IAnimatedMeshSceneNode.hpp:56
virtual IShadowVolumeSceneNode * addShadowVolumeSceneNode(const IMesh *shadowMesh=0, dcpp::int32_kt id=-1, bool zfailmethod=true, dcpp::float32_kt infinity=1000.0f)=0
virtual void animateJoints(bool CalculateAbsolutePositions=true)=0
animates the joints in the mesh based on the current frame.
virtual bool getLoopMode() const =0
returns the current loop mode
virtual bool isReadOnlyMaterials() const =0
Returns if the scene node should not copy the materials of the mesh but use them in a read only style...
virtual ISceneNode * clone(ISceneNode *newParent=0, ISceneManager *newManager=0)=0
Creates a clone of this scene node and its children.
virtual IBoneSceneNode * getJointNode(const dcpp::char_kt *jointName)=0
Get a pointer to a joint in the mesh (if the mesh is a bone based mesh).
virtual void setAnimationSpeed(dcpp::float32_kt framesPerSecond)=0
Sets the speed with which the animation is played.
virtual void setAnimationEndCallback(IAnimationEndCallBack *callback=0)=0
Sets a callback interface which will be called if an animation playback has ended.
virtual void setCurrentFrame(dcpp::float32_kt frame)=0
Sets the current frame number.
virtual dcpp::int32_kt getStartFrame() const =0
Returns the current start frame number.
virtual dcpp::uint32_kt getJointCount() const =0
Gets joint count.
virtual dcpp::float32_kt getFrameNr() const =0
Returns the currently displayed frame number.
virtual IAnimatedMesh * getMesh(void)=0
Returns the current mesh.
virtual void setReadOnlyMaterials(bool readonly)=0
Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
virtual bool setFrameLoop(dcpp::int32_kt begin, dcpp::int32_kt end)=0
Sets the frame numbers between the animation is looped.
virtual dcpp::int32_kt getEndFrame() const =0
Returns the current end frame number.
Interface for an animated mesh.
Definition IAnimatedMesh.hpp:21
Callback interface for catching events of ended animations.
Definition IAnimatedMeshSceneNode.hpp:40
virtual void OnAnimationEnd(IAnimatedMeshSceneNode *node)=0
Will be called when the animation playback has ended.
Interface for bones used for skeletal animation.
Definition IBoneSceneNode.hpp:56
Class which holds the geometry of an object.
Definition IMesh.hpp:72
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Scene node interface.
Definition ISceneNode.hpp:43
Scene node for rendering a shadow volume into a stencil buffer.
Definition IShadowVolumeSceneNode.hpp:34
hold a tag info for connecting meshes
Definition IAnimatedMeshMD3.hpp:160
EMD2_ANIMATION_TYPE
Types of standard md2 animations.
Definition IAnimatedMeshMD2.hpp:17
E_JOINT_UPDATE_ON_RENDER
Definition IAnimatedMeshSceneNode.hpp:20
@ EJUOR_CONTROL
control joint positions in the mesh (eg. ragdolls, or set the animation from animateJoints() )
Definition IAnimatedMeshSceneNode.hpp:28
@ EJUOR_NONE
do nothing
Definition IAnimatedMeshSceneNode.hpp:22
@ EJUOR_READ
get joints positions from the mesh (for attached nodes, etc)
Definition IAnimatedMeshSceneNode.hpp:25
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
char char_kt
8 bit character variable.
Definition irrTypes.hpp:37
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72

Duckcpp    @cppfx.xyz