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