![]() |
Murl Engine API
Version 2018.3
|
The IBone graph node interface. More...
#include <murl_graph_i_bone.h>
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.
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 | 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 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... | |
![]() | |
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... | |
|
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.
|
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.
|
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.
|
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.
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.
offsetTransform | The offset transform to set. |
|
pure virtual |
Get the constant offset transform.
|
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.
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.
userTransform | The user transform to set. |
|
pure virtual |
Get the constant user transform.
|
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.
|
pure virtual |
Get the constant overall bone transform.
|
pure virtual |
Get the bone's number of stages.
|
pure virtual |
Get the bone's internal video renderer object.
stage | The stage to query. |