00001
00002
00003
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 #include "IShadowVolumeSceneNode.h"
00013
00014 namespace irr
00015 {
00016 namespace scene
00017 {
00018
00019
00020 enum E_JOINT_UPDATE_ON_RENDER
00021 {
00023 EJUOR_NONE = 0,
00024
00026 EJUOR_READ,
00027
00029 EJUOR_CONTROL,
00030
00032 EJUOR_COUNT
00033 };
00034
00035
00036 class IAnimatedMeshSceneNode;
00037
00039
00043 class IAnimationEndCallBack : public virtual IReferenceCounted
00044 {
00045 public:
00046
00048
00051 virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0;
00052 };
00053
00055
00057 class IAnimatedMeshSceneNode : public ISceneNode
00058 {
00059 public:
00060
00062 IAnimatedMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
00063 const core::vector3df& position = core::vector3df(0,0,0),
00064 const core::vector3df& rotation = core::vector3df(0,0,0),
00065 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
00066 : ISceneNode(parent, mgr, id, position, rotation, scale) {}
00067
00069 virtual ~IAnimatedMeshSceneNode() {}
00070
00072
00076 virtual void setCurrentFrame(f32 frame) = 0;
00077
00079
00083 virtual bool setFrameLoop(s32 begin, s32 end) = 0;
00084
00086
00087 virtual void setAnimationSpeed(f32 framesPerSecond) = 0;
00088
00090
00104 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(s32 id=-1,
00105 bool zfailmethod=true, f32 infinity=10000.0f) = 0;
00106
00107
00109
00123 virtual IBoneSceneNode* getJointNode(const c8* jointName)=0;
00124
00126 virtual IBoneSceneNode* getJointNode(u32 jointID) = 0;
00127
00129 virtual ISceneNode* getMS3DJointNode(const c8* jointName) = 0;
00130
00132 virtual ISceneNode* getXJointNode(const c8* jointName) = 0;
00133
00135
00142 virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0;
00143
00145
00157 virtual bool setMD2Animation(const c8* animationName) = 0;
00158
00160 virtual f32 getFrameNr() const = 0;
00162 virtual s32 getStartFrame() const = 0;
00164 virtual s32 getEndFrame() const = 0;
00165
00167
00168 virtual void setLoopMode(bool playAnimationLooped) = 0;
00169
00171
00174 virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0;
00175
00177
00178
00179
00180 virtual void setReadOnlyMaterials(bool readonly) = 0;
00181
00183 virtual bool isReadOnlyMaterials() const = 0;
00184
00186 virtual void setMesh(IAnimatedMesh* mesh) = 0;
00187
00189 virtual IAnimatedMesh* getMesh(void) = 0;
00190
00192 virtual const SMD3QuaterionTag& getMD3TagTransformation( const core::stringc & tagname) = 0;
00193
00195 virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0;
00196
00198
00201 virtual void setTransitionTime(f32 Time) =0;
00202
00204
00205 virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0;
00206
00208
00209 virtual void setRenderFromIdentity( bool On )=0;
00210 };
00211
00212 }
00213 }
00214
00215 #endif
00216