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 __C_BONE_SCENE_NODE_H_INCLUDED__
6
#define __C_BONE_SCENE_NODE_H_INCLUDED__
8
// Used with SkinnedMesh and IAnimatedMeshSceneNode, for boned meshes
10
#include "IBoneSceneNode.h"
17
class CBoneSceneNode : public IBoneSceneNode
22
CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr,
23
s32 id=-1, u32 boneIndex=0, const c8* boneName=0);
25
//! Returns the index of the bone
26
virtual u32 getBoneIndex() const;
28
//! Sets the animation mode of the bone. Returns true if successful.
29
virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode);
31
//! Gets the current animation mode of the bone
32
virtual E_BONE_ANIMATION_MODE getAnimationMode() const;
34
//! returns the axis aligned bounding box of this node
35
virtual const core::aabbox3d<f32>& getBoundingBox() const;
38
//! Returns the relative transformation of the scene node.
39
//virtual core::matrix4 getRelativeTransformation() const;
42
virtual void OnAnimate(u32 timeMs);
44
virtual void updateAbsolutePositionOfAllChildren();
46
//! Writes attributes of the scene node.
47
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
49
//! Reads attributes of the scene node.
50
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
52
//! How the relative transformation of the bone is used
53
virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space )
58
virtual E_BONE_SKINNING_SPACE getSkinningSpace() const
64
void helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node);
68
core::aabbox3d<f32> Box;
70
E_BONE_ANIMATION_MODE AnimationMode;
71
E_BONE_SKINNING_SPACE SkinningSpace;
75
} // end namespace scene
76
} // end namespace irr