| Irrlicht 3D Engine |

IAnimatedMeshSceneNode.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
    00006 #define __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
    00007
    00008 #include "ISceneNode.h"
    00009 #include "IBoneSceneNode.h"
    00010 #include "IAnimatedMeshMD2.h"
    00011 #include "IAnimatedMeshMD3.h"
    00012
    00013 namespace irr
    00014 {
    00015 namespace scene
    00016 {
    00017     class IShadowVolumeSceneNode;
    00018
    00019     enum E_JOINT_UPDATE_ON_RENDER
    00020     {
    00022         EJUOR_NONE = 0,
    00023
    00025         EJUOR_READ,
    00026
    00028         EJUOR_CONTROL
    00029     };
    00030
    00031
    00032     class IAnimatedMeshSceneNode;
    00033
    00035
    00039     class IAnimationEndCallBack : public virtual IReferenceCounted
    00040     {
    00041     public:
    00042
    00044
    00047         virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0;
    00048     };
    00049
    00051
    00053     class IAnimatedMeshSceneNode : public ISceneNode
    00054     {
    00055     public:
    00056
    00058         IAnimatedMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
    00059             const core::vector3df& position = core::vector3df(0,0,0),
    00060             const core::vector3df& rotation = core::vector3df(0,0,0),
    00061             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
    00062             : ISceneNode(parent, mgr, id, position, rotation, scale) {}
    00063
    00065         virtual ~IAnimatedMeshSceneNode() {}
    00066
    00068
    00072         virtual void setCurrentFrame(f32 frame) = 0;
    00073
    00075
    00079         virtual bool setFrameLoop(s32 begin, s32 end) = 0;
    00080
    00082
    00083         virtual void setAnimationSpeed(f32 framesPerSecond) = 0;
    00084
    00086
    00087         virtual f32 getAnimationSpeed() const =0;
    00088
    00090
    00107         virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0,
    00108             s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0;
    00109
    00110
    00112
    00126         virtual IBoneSceneNode* getJointNode(const c8* jointName)=0;
    00127
    00129         virtual IBoneSceneNode* getJointNode(u32 jointID) = 0;
    00130
    00132
    00133         virtual u32 getJointCount() const = 0;
    00134
    00136
    00143         virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0;
    00144
    00146
    00158         virtual bool setMD2Animation(const c8* animationName) = 0;
    00159
    00161         virtual f32 getFrameNr() const = 0;
    00163         virtual s32 getStartFrame() const = 0;
    00165         virtual s32 getEndFrame() const = 0;
    00166
    00168
    00169         virtual void setLoopMode(bool playAnimationLooped) = 0;
    00170
    00172
    00173         virtual bool getLoopMode() const = 0;
    00174
    00176
    00179         virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0;
    00180
    00182
    00185         virtual void setReadOnlyMaterials(bool readonly) = 0;
    00186
    00188         virtual bool isReadOnlyMaterials() const = 0;
    00189
    00191         virtual void setMesh(IAnimatedMesh* mesh) = 0;
    00192
    00194         virtual IAnimatedMesh* getMesh(void) = 0;
    00195
    00197         virtual const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname) = 0;
    00198
    00200         virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0;
    00201
    00203
    00206         virtual void setTransitionTime(f32 Time) =0;
    00207
    00209
    00210         virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0;
    00211
    00213
    00214         virtual void setRenderFromIdentity( bool On )=0;
    00215
    00217
    00220         virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0;
    00221
    00222     };
    00223
    00224 } // end namespace scene
    00225 } // end namespace irr
    00226
    00227 #endif
    00228