]> git.lizzy.rs Git - irrlicht.git/blob - include/IBoneSceneNode.h
Add back LightManager
[irrlicht.git] / include / IBoneSceneNode.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_BONE_SCENE_NODE_H_INCLUDED__\r
6 #define __I_BONE_SCENE_NODE_H_INCLUDED__\r
7 \r
8 #include "ISceneNode.h"\r
9 \r
10 namespace irr\r
11 {\r
12 namespace scene\r
13 {\r
14 \r
15         //! Enumeration for different bone animation modes\r
16         enum E_BONE_ANIMATION_MODE\r
17         {\r
18                 //! The bone is usually animated, unless it's parent is not animated\r
19                 EBAM_AUTOMATIC=0,\r
20 \r
21                 //! The bone is animated by the skin, if it's parent is not animated then animation will resume from this bone onward\r
22                 EBAM_ANIMATED,\r
23 \r
24                 //! The bone is not animated by the skin\r
25                 EBAM_UNANIMATED,\r
26 \r
27                 //! Not an animation mode, just here to count the available modes\r
28                 EBAM_COUNT\r
29 \r
30         };\r
31 \r
32         enum E_BONE_SKINNING_SPACE\r
33         {\r
34                 //! local skinning, standard\r
35                 EBSS_LOCAL=0,\r
36 \r
37                 //! global skinning\r
38                 EBSS_GLOBAL,\r
39 \r
40                 EBSS_COUNT\r
41         };\r
42 \r
43         //! Names for bone animation modes\r
44         const c8* const BoneAnimationModeNames[] =\r
45         {\r
46                 "automatic",\r
47                 "animated",\r
48                 "unanimated",\r
49                 0,\r
50         };\r
51 \r
52 \r
53         //! Interface for bones used for skeletal animation.\r
54         /** Used with ISkinnedMesh and IAnimatedMeshSceneNode. */\r
55         class IBoneSceneNode : public ISceneNode\r
56         {\r
57         public:\r
58 \r
59                 IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :\r
60                         ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }\r
61 \r
62                 //! Get the name of the bone\r
63                 /** \deprecated Use getName instead. This method may be removed by Irrlicht 1.9 */\r
64                 _IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); }\r
65 \r
66                 //! Get the index of the bone\r
67                 virtual u32 getBoneIndex() const = 0;\r
68 \r
69                 //! Sets the animation mode of the bone.\r
70                 /** \return True if successful. (Unused) */\r
71                 virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0;\r
72 \r
73                 //! Gets the current animation mode of the bone\r
74                 virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0;\r
75 \r
76                 //! Get the axis aligned bounding box of this node\r
77                 const core::aabbox3d<f32>& getBoundingBox() const override = 0;\r
78 \r
79                 //! Returns the relative transformation of the scene node.\r
80                 //virtual core::matrix4 getRelativeTransformation() const = 0;\r
81 \r
82                 //! The animation method.\r
83                 void OnAnimate(u32 timeMs) override =0;\r
84 \r
85                 //! The render method.\r
86                 /** Does nothing as bones are not visible. */\r
87                 void render() override { }\r
88 \r
89                 //! How the relative transformation of the bone is used\r
90                 virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;\r
91 \r
92                 //! How the relative transformation of the bone is used\r
93                 virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0;\r
94 \r
95                 //! Updates the absolute position based on the relative and the parents position\r
96                 virtual void updateAbsolutePositionOfAllChildren()=0;\r
97 \r
98                 s32 positionHint;\r
99                 s32 scaleHint;\r
100                 s32 rotationHint;\r
101         };\r
102 \r
103 \r
104 } // end namespace scene\r
105 } // end namespace irr\r
106 \r
107 #endif\r
108 \r