The IBone graph node interface. More...
#include "murl_graph_i_bone.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual ITransform * | GetTransformInterface ()=0 |
Get the mutable Graph::ITransform interface. More... | |
virtual const ITransform * | GetTransformInterface () 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 Matrix & | GetOffsetTransform () const =0 |
Get the constant offset transform. More... | |
virtual Matrix & | GetOffsetTransform ()=0 |
Get the mutable offset transform. More... | |
virtual Bool | SetUserTransform (const Matrix &userTransform)=0 |
Set the user transform. More... | |
virtual const Matrix & | GetUserTransform () const =0 |
Get the constant user transform. More... | |
virtual Matrix & | GetUserTransform ()=0 |
Get the mutable user transform. More... | |
virtual Bool | SetWorldTransform (const Matrix &worldTransform)=0 |
Set the world transform. More... | |
virtual const Matrix & | GetWorldTransform () const =0 |
Get the constant world transform. More... | |
virtual Matrix & | GetWorldTransform ()=0 |
Get the mutable world transform. More... | |
virtual const Matrix & | GetSkeletonTransform () const =0 |
Get the constant skeleton transform. More... | |
virtual const Matrix & | GetBoneTransform () const =0 |
Get the constant overall bone transform. More... | |
virtual UInt32 | GetNumberOfStages () const =0 |
Get the bone's number of stages. More... | |
virtual Video::IBone * | GetVideoBoneObject (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]
|
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]
|
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]
|
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]
|
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()
Set the bone length.
- Parameters
-
length The length to set.
- Returns
- true if successful.
◆ GetLength()
|
pure virtual |
Get the bone length.
- Returns
- The length
◆ SetOffsetTransform()
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
-
offsetTransform The offset transform to set.
- Returns
- true if successful.
◆ GetOffsetTransform() [1/2]
|
pure virtual |
Get the constant offset transform.
- Returns
- A constant reference to the internal offset transform.
◆ GetOffsetTransform() [2/2]
|
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()
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
-
userTransform The user transform to set.
- Returns
- true if successful.
◆ GetUserTransform() [1/2]
|
pure virtual |
Get the constant user transform.
- Returns
- A constant reference to the internal user transform.
◆ GetUserTransform() [2/2]
|
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()
Set the world transform.
- Parameters
-
worldTransform The world transform to set.
- Returns
- true if successful.
◆ GetWorldTransform() [1/2]
|
pure virtual |
Get the constant world transform.
- Returns
- A constant reference to the internal world transform.
◆ GetWorldTransform() [2/2]
|
pure virtual |
Get the mutable world transform.
- Returns
- A mutable reference to the internal world transform.
◆ GetSkeletonTransform()
|
pure virtual |
Get the constant skeleton transform.
- Returns
- A constant reference to the internal skeleton transform.
◆ GetBoneTransform()
|
pure virtual |
Get the constant overall bone transform.
- Returns
- A constant reference to the overall bone transform.
◆ GetNumberOfStages()
|
pure virtual |
Get the bone's number of stages.
- Returns
- The number of stages.
◆ GetVideoBoneObject()
|
pure virtual |
Get the bone's internal video renderer object.
- Parameters
-
stage The stage to query.
- Returns
- The video renderer object.
The documentation for this interface was generated from the following file:
- murl_graph_i_bone.h