Irrlicht 3D Engine
IBoneSceneNode.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_BONE_SCENE_NODE_H_INCLUDED__
00006 #define __I_BONE_SCENE_NODE_H_INCLUDED__
00007 
00008 #include "ISceneNode.h"
00009 
00010 namespace irr
00011 {
00012 namespace scene
00013 {
00014 
00016     enum E_BONE_ANIMATION_MODE
00017     {
00019         EBAM_AUTOMATIC=0,
00020 
00022         EBAM_ANIMATED,
00023 
00025         EBAM_UNANIMATED,
00026 
00028         EBAM_COUNT
00029 
00030     };
00031 
00032     enum E_BONE_SKINNING_SPACE
00033     {
00035         EBSS_LOCAL=0,
00036 
00038         EBSS_GLOBAL,
00039 
00040         EBSS_COUNT
00041     };
00042 
00044     const c8* const BoneAnimationModeNames[] =
00045     {
00046         "automatic",
00047         "animated",
00048         "unanimated",
00049         0,
00050     };
00051 
00052 
00054 
00055     class IBoneSceneNode : public ISceneNode
00056     {
00057     public:
00058 
00059         IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
00060             ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
00061 
00063 
00064         _IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); }
00065 
00067         virtual u32 getBoneIndex() const = 0;
00068 
00070 
00071         virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0;
00072 
00074         virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0;
00075 
00077         virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
00078 
00080         //virtual core::matrix4 getRelativeTransformation() const = 0;
00081 
00083         virtual void OnAnimate(u32 timeMs) =0;
00084 
00086 
00087         virtual void render() { }
00088 
00090         virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;
00091 
00093         virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0;
00094 
00096         virtual void updateAbsolutePositionOfAllChildren()=0;
00097 
00098         s32 positionHint;
00099         s32 scaleHint;
00100         s32 rotationHint;
00101     };
00102 
00103 
00104 } // end namespace scene
00105 } // end namespace irr
00106 
00107 #endif
00108