![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IBoneState graph node interface.
A bone state node is used to assign a given Graph::IBone to a given unit during scene graph traversal. For the purpose of vertex skinning, a renderable geometry such as a Graph::IResourceMeshGeometry node can link to one or more bones by specifying the appropriate number of bone unit indices; during scene graph traversal, the currently active bones at the selected units will be taken to actually deform the geometry.
The correct sequence of creating and using a skeleton for performing vertex skinning is as follows:
Use the interface's GetBoneNodeTarget() method to programmatically set the bone node this state object is supposed to refer to.
Use the base interface's IStateUnit::SetUnit() method to set the actual unit index the referenced bone should be attached to.
See sceneGraphStatesSlotsUnits for an overview of state handling during scene graph traversal.
See Graph::IBone for defining bones to refer to.
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.
Murl.Graph.INode GetNodeInterface()
Get the constant Graph::IBoneNodeTarget container. This method returns a mutable pointer to the node's Graph::IBoneNodeTarget container, which allows to query the bone state node's referenced bone node.
Murl.Graph.IGenericNodeTarget.GraphIBone GetBoneNodeTarget()