1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
5
#ifndef __I_BONE_SCENE_NODE_H_INCLUDED__
6
#define __I_BONE_SCENE_NODE_H_INCLUDED__
8
#include "ISceneNode.h"
15
//! Enumeration for different bone animation modes
16
enum E_BONE_ANIMATION_MODE
18
//! The bone is usually animated, unless it's parent is not animated
21
//! The bone is animated by the skin, if it's parent is not animated then animation will resume from this bone onward
24
//! The bone is not animated by the skin
27
//! Not an animation mode, just here to count the available modes
32
enum E_BONE_SKINNING_SPACE
34
//! local skinning, standard
43
//! Names for bone animation modes
44
const c8* const BoneAnimationModeNames[] =
53
//! Interface for bones used for skeletal animation.
54
/** Used with ISkinnedMesh and IAnimatedMeshSceneNode. */
55
class IBoneSceneNode : public ISceneNode
59
IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
60
ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
62
//! Get the name of the bone
63
/** \deprecated Use getName instead. This method may be removed by Irrlicht 1.9 */
64
_IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); }
66
//! Get the index of the bone
67
virtual u32 getBoneIndex() const = 0;
69
//! Sets the animation mode of the bone.
70
/** \return True if successful. (Unused) */
71
virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0;
73
//! Gets the current animation mode of the bone
74
virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0;
76
//! Get the axis aligned bounding box of this node
77
virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
79
//! Returns the relative transformation of the scene node.
80
//virtual core::matrix4 getRelativeTransformation() const = 0;
82
//! The animation method.
83
virtual void OnAnimate(u32 timeMs) =0;
85
//! The render method.
86
/** Does nothing as bones are not visible. */
87
virtual void render() { }
89
//! How the relative transformation of the bone is used
90
virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;
92
//! How the relative transformation of the bone is used
93
virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0;
95
//! Updates the absolute position based on the relative and the parents position
96
virtual void updateAbsolutePositionOfAllChildren()=0;
104
} // end namespace scene
105
} // end namespace irr