Aligns the local axis orientation.
The alignAxis commands provide maximum bone configuration flexibility when working with skeletons. Often it is desirable to be able to adjust bone axes individually in order to match the requirements of the environment into which the motion capture animations will be imported. Shogun can support bones with any orientation of the local axis; however, this command will always put one of the specified axes "down the bone" for twist purposes.
A string composed of three letters, separated by spaces. Each component of the argument may be either X, Y, or Z.
The rotation axis indicated by the first letter in the argument, x axis if the argument is "x z z", for example, will be aligned with the vector from this joint to its first child joint.
The rotation axis indicated by the second letter in the argument, z axis if the argument is "x z z", will be aligned with the world axis indicated in the third letter of the argument (z).
The remaining axis is aligned according the right hand rule.
The arguments modify the joint orientation so that:
|The axis indicated here specifies the world axis that the second indicated joint axis will be aligned with|
|The axis indicated here is the axis of the joint that will be aligned with the world axis indicated in the third argument|
|The axis indicated here will be aligned with a vector drawn from the indicated joint to its child (i.e. down the twist axis of the bone.).|
|Name||Flag arguments||Argument type||Exclusive to||Comments|
|3||string||toNode, toLine||Aligns the axis specified in the second letter of the argument to an axis of the coordinate system formed by the three given nodes, as specified by the third letter of the argument|
|1||string||toSystem, toLine||Aligns the axis specified in the second letter of the argument with an axis of the named node specified by the third letter of the argument|
alignAxis y z z;
// Align a BoneNode's local axis as follows:
// Y axis aligned with the vector from the indicated
// node to its first child (i.e. down the bone).
// Z axis aligned (as closely as is possible)
// with the world Z axis.