Saga3D API Documentation  1.0-RC4
saga::scene::IBoneSceneNode Class Referenceabstract

Interface for bones used for skeletal animation. More...

#include <IBoneSceneNode.h>

Inheritance diagram for saga::scene::IBoneSceneNode:
saga::scene::ISceneNode saga::IEventReceiver

Public Member Functions

 IBoneSceneNode (const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > &mgr)
 
virtual std::uint32_t getBoneIndex () const =0
 Get the index of the bone. More...
 
virtual bool setAnimationMode (E_BONE_ANIMATION_MODE mode)=0
 Sets the animation mode of the bone. More...
 
virtual E_BONE_ANIMATION_MODE getAnimationMode () const =0
 Gets the current animation mode of the bone. More...
 
virtual const core::aabbox3d< float > & getBoundingBox () const =0
 Get the axis aligned bounding box of this node. More...
 
virtual void onAnimate (const float time)=0
 Returns the relative transformation of the scene node. More...
 
virtual void setSkinningSpace (E_BONE_SKINNING_SPACE space)=0
 How the relative transformation of the bone is used. More...
 
virtual E_BONE_SKINNING_SPACE getSkinningSpace () const =0
 How the relative transformation of the bone is used. More...
 
virtual void updateAbsolutePositionOfAllChildren ()=0
 Updates the absolute position based on the relative and the parents position. More...
 
- Public Member Functions inherited from saga::scene::ISceneNode
 ISceneNode (const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > &mgr, const glm::vec3 &position=glm::vec3(0, 0, 0), const glm::vec3 &rotation=glm::vec3(0, 0, 0), const glm::vec3 &scale=glm::vec3(1.0f, 1.0f, 1.0f))
 Constructor. More...
 
virtual void onEvent (const SDL_Event &event) override
 Called when an SDL event is fired. More...
 
virtual ~ISceneNode ()
 Destructor. More...
 
void setID (const ID id)
 
const auto getID () const
 
virtual void onRegisterSceneNode (video::RenderPassHandle pass)
 This method is called just before the rendering process of the whole scene. More...
 
virtual void onUnregisterSceneNode (video::RenderPassHandle pass)
 
void setOnRender (std::function< void()> func)
 
void onRender ()
 
bool hasDrawCommands () const
 
void setDrawCommands (video::DrawCommandList &&list)
 
const auto & getDrawCommands () const
 
auto getTexture (int slot) const
 
auto & getTextures ()
 
void setTexture (int slot, video::TextureHandle texture)
 
virtual void setPipeline (video::PipelineHandle pipeline)
 
auto getPipeline () const
 
virtual const std::string & getName () const
 Returns the name of the node. More...
 
virtual void setName (const std::string &name)
 Sets the name of the node. More...
 
virtual const core::aabbox3d< float > getTransformedBoundingBox () const
 Get the axis aligned, transformed and animated absolute bounding box of this node. More...
 
virtual void getTransformedBoundingBoxEdges (std::vector< glm::vec3 > &edges) const
 
virtual const glm::mat4 & getAbsoluteTransformation () const
 Get the absolute transformation of the node. Is recalculated every onAnimate()-call. More...
 
virtual glm::mat4 getRelativeTransformation () const
 Returns the relative transformation of the scene node. More...
 
virtual bool isVisible () const
 Returns whether the node should be visible (if all of its parents are visible). More...
 
virtual bool isTrulyVisible () const
 Check whether the node is truly visible, taking into accounts its parents' visibility. More...
 
virtual void setVisible (bool isVisible)
 Sets if the node should be visible or not. More...
 
virtual void addChild (const std::shared_ptr< ISceneNode > &child)
 Adds a child to this scene node. More...
 
virtual bool removeChild (const std::shared_ptr< ISceneNode > &child)
 
virtual void removeAll ()
 Removes all children of this scene node. More...
 
virtual void remove ()
 Removes this scene node from the scene. More...
 
virtual void addAnimator (const std::shared_ptr< ISceneNodeAnimator > &animator)
 Adds an animator which should animate this node. More...
 
const auto & getAnimators () const
 Get a list of all scene node animators. More...
 
virtual void removeAnimator (const std::shared_ptr< ISceneNodeAnimator > &animator)
 Removes an animator from this scene node. More...
 
virtual void removeAnimators ()
 Removes all animators from this scene node. More...
 
virtual const glm::vec3 & getScale () const
 Gets the scale of the scene node relative to its parent. More...
 
virtual void setScale (const glm::vec3 &scale)
 Sets the relative scale of the scene node. More...
 
virtual const glm::vec3 & getRotation () const
 Gets the rotation of the node relative to its parent. More...
 
virtual void setRotation (const glm::vec3 &rotation)
 Sets the rotation of the node relative to its parent. More...
 
virtual const glm::vec3 & getPosition () const
 Gets the position of the node relative to its parent. More...
 
virtual void setPosition (const glm::vec3 &newpos)
 Sets the position of the node relative to its parent. More...
 
virtual glm::vec3 getAbsolutePosition () const
 Gets the absolute position of the node in world coordinates. More...
 
const std::vector< std::shared_ptr< ISceneNode > > & getChildren () const
 Returns a const reference to the list of all children. More...
 
virtual void setParent (const std::shared_ptr< ISceneNode > &newParent)
 Changes the parent of the scene node. More...
 
virtual void updateAbsolutePosition ()
 Returns the triangle selector attached to this scene node. More...
 
const std::shared_ptr< ISceneNode > & getParent () const
 Returns the parent of this scene node. More...
 
virtual E_SCENE_NODE_TYPE getType () const
 Returns type of the scene node. More...
 
virtual std::shared_ptr< ISceneNodeclone (const std::shared_ptr< ISceneNode > &newParent=0)
 Creates a clone of this scene node and its children. More...
 
virtual const std::shared_ptr< ISceneManager > & getSceneManager () const
 Retrieve the scene manager for this node. More...
 
- Public Member Functions inherited from saga::IEventReceiver
virtual ~IEventReceiver ()
 Destructor. More...
 

Public Attributes

std::int32_t positionHint
 
std::int32_t scaleHint
 
std::int32_t rotationHint
 

Additional Inherited Members

- Protected Attributes inherited from saga::scene::ISceneNode
ID NodeID = INVALID_ID
 A clone function for the ISceneNode members. More...
 
std::string Name
 Name of the scene node. More...
 
glm::mat4 AbsoluteTransformation
 Absolute transformation of the node. More...
 
glm::vec3 RelativeTranslation
 Relative translation of the scene node. More...
 
glm::vec3 RelativeRotation
 Relative rotation of the scene node. More...
 
glm::vec3 RelativeScale
 Relative scale of the scene node. More...
 
std::shared_ptr< ISceneNodeParent = nullptr
 Pointer to the parent. More...
 
std::vector< std::shared_ptr< ISceneNode > > Children
 List of all children of this node. More...
 
std::array< video::STexture::HandleType, video::MAX_NODE_TEXTURESTextures = { video::NULL_GPU_RESOURCE_HANDLE }
 Texture list. More...
 
std::vector< std::shared_ptr< ISceneNodeAnimator > > Animators
 List of all animator nodes. More...
 
std::shared_ptr< ISceneManagerSceneManager = nullptr
 Pointer to the scene manager. More...
 
std::function< void()> OnRenderCallback = nullptr
 Custom hook into rendering process of the scene node. More...
 
video::DrawCommandList DrawCommands
 
video::PipelineHandle Pipeline = video::NULL_GPU_RESOURCE_HANDLE
 
bool IsVisible = true
 Is the node visible? More...
 

Detailed Description

Interface for bones used for skeletal animation.

Used with ISkinnedMesh and IAnimatedMeshSceneNode.

Definition at line 39 of file IBoneSceneNode.h.

Constructor & Destructor Documentation

◆ IBoneSceneNode()

saga::scene::IBoneSceneNode::IBoneSceneNode ( const std::shared_ptr< ISceneNode > &  parent,
const std::shared_ptr< ISceneManager > &  mgr 
)
inline

Definition at line 43 of file IBoneSceneNode.h.

Member Function Documentation

◆ getAnimationMode()

virtual E_BONE_ANIMATION_MODE saga::scene::IBoneSceneNode::getAnimationMode ( ) const
pure virtual

Gets the current animation mode of the bone.

◆ getBoneIndex()

virtual std::uint32_t saga::scene::IBoneSceneNode::getBoneIndex ( ) const
pure virtual

Get the index of the bone.

◆ getBoundingBox()

virtual const core::aabbox3d<float>& saga::scene::IBoneSceneNode::getBoundingBox ( ) const
pure virtual

Get the axis aligned bounding box of this node.

Implements saga::scene::ISceneNode.

◆ getSkinningSpace()

virtual E_BONE_SKINNING_SPACE saga::scene::IBoneSceneNode::getSkinningSpace ( ) const
pure virtual

How the relative transformation of the bone is used.

◆ onAnimate()

virtual void saga::scene::IBoneSceneNode::onAnimate ( const float  time)
pure virtual

Returns the relative transformation of the scene node.

The animation method.

Reimplemented from saga::scene::ISceneNode.

◆ setAnimationMode()

virtual bool saga::scene::IBoneSceneNode::setAnimationMode ( E_BONE_ANIMATION_MODE  mode)
pure virtual

Sets the animation mode of the bone.

Returns
True if successful. (Unused)

◆ setSkinningSpace()

virtual void saga::scene::IBoneSceneNode::setSkinningSpace ( E_BONE_SKINNING_SPACE  space)
pure virtual

How the relative transformation of the bone is used.

◆ updateAbsolutePositionOfAllChildren()

virtual void saga::scene::IBoneSceneNode::updateAbsolutePositionOfAllChildren ( )
pure virtual

Updates the absolute position based on the relative and the parents position.

Member Data Documentation

◆ positionHint

std::int32_t saga::scene::IBoneSceneNode::positionHint

Definition at line 74 of file IBoneSceneNode.h.

◆ rotationHint

std::int32_t saga::scene::IBoneSceneNode::rotationHint

Definition at line 76 of file IBoneSceneNode.h.

◆ scaleHint

std::int32_t saga::scene::IBoneSceneNode::scaleHint

Definition at line 75 of file IBoneSceneNode.h.


The documentation for this class was generated from the following file: