Saga3D API Documentation  1.0-RC4
IBoneSceneNode.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_BONE_SCENE_NODE_H_INCLUDED__
6 #define __I_BONE_SCENE_NODE_H_INCLUDED__
7 
8 #include "ISceneNode.h"
9 
10 namespace saga
11 {
12 namespace scene
13 {
14 
17  {
19  AUTOMATIC,
20 
22  ANIMATED,
23 
25  UNANIMATED,
26  };
27 
29  {
31  LOCAL,
32 
34  GLOBAL
35  };
36 
38 
39  class IBoneSceneNode : public ISceneNode
40  {
41  public:
42 
43  IBoneSceneNode(const std::shared_ptr<ISceneNode>& parent, const std::shared_ptr<ISceneManager>& mgr) :
44  ISceneNode(parent, mgr), positionHint(-1), scaleHint(-1), rotationHint(-1) { }
45 
47  virtual std::uint32_t getBoneIndex() const = 0;
48 
50 
51  virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0;
52 
54  virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0;
55 
57  virtual const core::aabbox3d<float>& getBoundingBox() const = 0;
58 
60  //virtual glm::mat4 getRelativeTransformation() const = 0;
61 
63  virtual void onAnimate(const float time) = 0;
64 
66  virtual void setSkinningSpace(E_BONE_SKINNING_SPACE space) = 0;
67 
69  virtual E_BONE_SKINNING_SPACE getSkinningSpace() const = 0;
70 
72  virtual void updateAbsolutePositionOfAllChildren()= 0;
73 
74  std::int32_t positionHint;
75  std::int32_t scaleHint;
76  std::int32_t rotationHint;
77  };
78 
79 
80 } // namespace scene
81 } // namespace saga
82 
83 #endif
84 
saga::scene::ANIMATED
@ ANIMATED
Definition: IMesh.h:18
saga::scene::E_BONE_SKINNING_SPACE::GLOBAL
@ GLOBAL
global skinning
saga::scene::IBoneSceneNode::IBoneSceneNode
IBoneSceneNode(const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > &mgr)
Definition: IBoneSceneNode.h:43
saga::scene::E_BONE_SKINNING_SPACE
E_BONE_SKINNING_SPACE
Definition: IBoneSceneNode.h:28
saga::scene::ISceneNode
Type for list of scene node animators.
Definition: ISceneNode.h:41
saga::scene::E_BONE_SKINNING_SPACE::LOCAL
@ LOCAL
local skinning, standard
saga::scene::IBoneSceneNode::getBoundingBox
virtual const core::aabbox3d< float > & getBoundingBox() const =0
Get the axis aligned bounding box of this node.
saga::scene::IBoneSceneNode::getAnimationMode
virtual E_BONE_ANIMATION_MODE getAnimationMode() const =0
Gets the current animation mode of the bone.
ISceneNode.h
saga::scene::IBoneSceneNode::scaleHint
std::int32_t scaleHint
Definition: IBoneSceneNode.h:75
saga::scene::IBoneSceneNode::setAnimationMode
virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode)=0
Sets the animation mode of the bone.
saga::core::aabbox3d< float >
saga::scene::E_BONE_ANIMATION_MODE::AUTOMATIC
@ AUTOMATIC
The bone is usually animated, unless it's parent is not animated.
saga::scene::IBoneSceneNode::setSkinningSpace
virtual void setSkinningSpace(E_BONE_SKINNING_SPACE space)=0
How the relative transformation of the bone is used.
saga::scene::IBoneSceneNode::rotationHint
std::int32_t rotationHint
Definition: IBoneSceneNode.h:76
saga::scene::E_BONE_ANIMATION_MODE
E_BONE_ANIMATION_MODE
Enumeration for different bone animation modes.
Definition: IBoneSceneNode.h:16
saga::scene::IBoneSceneNode
Interface for bones used for skeletal animation.
Definition: IBoneSceneNode.h:39
saga::scene::IBoneSceneNode::onAnimate
virtual void onAnimate(const float time)=0
Returns the relative transformation of the scene node.
saga::scene::IBoneSceneNode::getSkinningSpace
virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0
How the relative transformation of the bone is used.
saga::scene::IBoneSceneNode::updateAbsolutePositionOfAllChildren
virtual void updateAbsolutePositionOfAllChildren()=0
Updates the absolute position based on the relative and the parents position.
saga::scene::IBoneSceneNode::positionHint
std::int32_t positionHint
Definition: IBoneSceneNode.h:74
saga::scene::E_BONE_ANIMATION_MODE::UNANIMATED
@ UNANIMATED
The bone is not animated by the skin.
saga
Definition: aabbox3d.h:11
saga::scene::IBoneSceneNode::getBoneIndex
virtual std::uint32_t getBoneIndex() const =0
Get the index of the bone.