The IBone graph node interface. More...

#include "murl_graph_i_bone.h"

Inheritance diagram for Murl::Graph::IBone:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual ITransformGetTransformInterface ()=0
 Get the mutable Graph::ITransform interface. More...
 
virtual const ITransformGetTransformInterface () const =0
 Get the constant Graph::ITransform interface. More...
 
virtual Bool SetLength (Real length)=0
 Set the bone length. More...
 
virtual Real GetLength () const =0
 Get the bone length. More...
 
virtual Bool SetOffsetTransform (const Matrix &offsetTransform)=0
 Set the offset transform. More...
 
virtual const MatrixGetOffsetTransform () const =0
 Get the constant offset transform. More...
 
virtual MatrixGetOffsetTransform ()=0
 Get the mutable offset transform. More...
 
virtual Bool SetUserTransform (const Matrix &userTransform)=0
 Set the user transform. More...
 
virtual const MatrixGetUserTransform () const =0
 Get the constant user transform. More...
 
virtual MatrixGetUserTransform ()=0
 Get the mutable user transform. More...
 
virtual Bool SetWorldTransform (const Matrix &worldTransform)=0
 Set the world transform. More...
 
virtual const MatrixGetWorldTransform () const =0
 Get the constant world transform. More...
 
virtual MatrixGetWorldTransform ()=0
 Get the mutable world transform. More...
 
virtual const MatrixGetSkeletonTransform () const =0
 Get the constant skeleton transform. More...
 
virtual const MatrixGetBoneTransform () const =0
 Get the constant overall bone transform. More...
 
virtual UInt32 GetNumberOfStages () const =0
 Get the bone's number of stages. More...
 
virtual Video::IBoneGetVideoBoneObject (UInt32 stage) const =0
 Get the bone's internal video renderer object. More...
 
- Public Member Functions inherited from Murl::Graph::IStateUnit
virtual Bool SetUnit (UInt32 unit)=0
 Set the unit index to use. More...
 
virtual UInt32 GetUnit () const =0
 Get the unit index to use. More...
 

Detailed Description

The IBone graph node interface.

Bones can be used to build an (animated) skeleton structure, to later apply vertex skinning to a mesh, in other words deform the model of e.g. a human body according to the movements of the skeleton.

The first of two ways to use a bone is to activate it through a Graph::IBoneState node later in the scene graph, which assigns the bone to a given unit. Subsequent rendering geometry can refer to this bone through the assigned unit; there is a maximum of 24 distinct units that can be used in parallel (geometry that is using more than 24 bones by design must be split into multiple separate geometries through the scene converter tool. See IEnums::BoneUnit).

Use the Graph::IStateUnit base interface to set or get the bone unit index this bone is temporarily attached to if any children are present.

See Output-States, Slots und Units for an overview of state handling during scene graph traversal.
See Graph::IBoneState for assigning bones.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::IBone::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::IBone::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ GetTransformInterface() [1/2]

virtual ITransform* Murl::Graph::IBone::GetTransformInterface ( )
pure virtual

Get the mutable Graph::ITransform interface.

This method returns a mutable pointer to the node's Graph::ITransform interface, to be able to query or modify the node's transformation matrix and depth order.

Returns
The mutable Graph::ITransform interface, or null if not available

◆ GetTransformInterface() [2/2]

virtual const ITransform* Murl::Graph::IBone::GetTransformInterface ( ) const
pure virtual

Get the constant Graph::ITransform interface.

This method returns a constant pointer to the node's Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.

Returns
The constant Graph::ITransform interface, or null if not available

◆ SetLength()

virtual Bool Murl::Graph::IBone::SetLength ( Real  length)
pure virtual

Set the bone length.

Parameters
lengthThe length to set.
Returns
true if successful.

◆ GetLength()

virtual Real Murl::Graph::IBone::GetLength ( ) const
pure virtual

Get the bone length.

Returns
The length

◆ SetOffsetTransform()

virtual Bool Murl::Graph::IBone::SetOffsetTransform ( const Matrix offsetTransform)
pure virtual

Set the offset transform.

An animated skeleton can simply be built and visualized in a hierarchical way, using relative transforms (and attached animations) for each individual bone with regard to its parent structure. To connect the skeleton to a given renderable mesh at run-time, which is usually modeled in some form of "bind pose", an additional transform for each bone is needed. This "offset transform" is static for a single mesh-skeleton relation.

Parameters
offsetTransformThe offset transform to set.
Returns
true if successful.

◆ GetOffsetTransform() [1/2]

virtual const Matrix& Murl::Graph::IBone::GetOffsetTransform ( ) const
pure virtual

Get the constant offset transform.

Returns
A constant reference to the internal offset transform.

◆ GetOffsetTransform() [2/2]

virtual Matrix& Murl::Graph::IBone::GetOffsetTransform ( )
pure virtual

Get the mutable offset transform.

This method can be called to get access to the internal offset transform for direct manipulation. Internally, the bone's state will be set to "modified" as soon as this method is called.

Returns
A mutable reference to the internal offset transform.

◆ SetUserTransform()

virtual Bool Murl::Graph::IBone::SetUserTransform ( const Matrix userTransform)
pure virtual

Set the user transform.

By default, the user transform equals the identity matrix. Individual bones of a skeleton may be easily controlled by a Logic::IProcessor by simply manipulating their user transform, i.e. by calling this function. For example, in an animated human body model one could simply pick the skeleton's "spine" bone and replace its user matrix with a matrix containing a rotation around e.g. the Y axis (depending how the model was designed) to make the figure's head turn.

Parameters
userTransformThe user transform to set.
Returns
true if successful.

◆ GetUserTransform() [1/2]

virtual const Matrix& Murl::Graph::IBone::GetUserTransform ( ) const
pure virtual

Get the constant user transform.

Returns
A constant reference to the internal user transform.

◆ GetUserTransform() [2/2]

virtual Matrix& Murl::Graph::IBone::GetUserTransform ( )
pure virtual

Get the mutable user transform.

This method can be called to get access to the internal user transform for direct manipulation. Internally, the bone's state will be set to "modified" as soon as this method is called.

Returns
A mutable reference to the internal user transform.

◆ SetWorldTransform()

virtual Bool Murl::Graph::IBone::SetWorldTransform ( const Matrix worldTransform)
pure virtual

Set the world transform.

Parameters
worldTransformThe world transform to set.
Returns
true if successful.

◆ GetWorldTransform() [1/2]

virtual const Matrix& Murl::Graph::IBone::GetWorldTransform ( ) const
pure virtual

Get the constant world transform.

Returns
A constant reference to the internal world transform.

◆ GetWorldTransform() [2/2]

virtual Matrix& Murl::Graph::IBone::GetWorldTransform ( )
pure virtual

Get the mutable world transform.

Returns
A mutable reference to the internal world transform.

◆ GetSkeletonTransform()

virtual const Matrix& Murl::Graph::IBone::GetSkeletonTransform ( ) const
pure virtual

Get the constant skeleton transform.

Returns
A constant reference to the internal skeleton transform.

◆ GetBoneTransform()

virtual const Matrix& Murl::Graph::IBone::GetBoneTransform ( ) const
pure virtual

Get the constant overall bone transform.

Returns
A constant reference to the overall bone transform.

◆ GetNumberOfStages()

virtual UInt32 Murl::Graph::IBone::GetNumberOfStages ( ) const
pure virtual

Get the bone's number of stages.

Returns
The number of stages.

◆ GetVideoBoneObject()

virtual Video::IBone* Murl::Graph::IBone::GetVideoBoneObject ( UInt32  stage) const
pure virtual

Get the bone's internal video renderer object.

Parameters
stageThe stage to query.
Returns
The video renderer object.

The documentation for this interface was generated from the following file:
  • murl_graph_i_bone.h


Copyright © 2011-2024 Spraylight GmbH.