![]()
gePose
Description: Bone hierarchy interface.
Source file: …\genesis3d\OpenSource\Source\Actor\pose.h
Functions:
Create, Destroy, AddJoint, GetScale, SetScale, FindNamedJointIndex, GetJointCount, MatchesMotionExactly, Clear, SetMotion, SetMotionForABone, BlendMotion, GetJointTransform, GetAllJointTransforms, GetJointLocalTransform, SetJointLocalTransform, GetJointAttachment, SetJointAttachment, GetJointName, Attach, Detach, ClearCoverage, AccumulateCoverage gePose_BlendingType, gePoseConstants:
GE_POSE_ROOT_JOINTOverview
: viewAdditions for Genesis3D v1.6: None
![]()
This object is a hierarchical set of attached joints. The joints can have names.
A 'gePose' keeps track of which children joints move in the hierarchy when a parent
joint moves. A gePose also remembers the position transform matrices for each joint.
The gePose is set by applying a motion at a specific time. This queries the motion
to determine each joint's change and applies them to the hierarchy. Each joint can
then be queried for it's world transform (for drawing, etc.)
Additional motions can modify or be blended into the pose. A motion that describes
only a few joint changes can be applied to only those joints, or a motion can be
blended with the current pose.
Something to watch for: since setting the pose by applying a motion is powerful
enough to resolve intentionally mismatched motion-pose sets, this can lead to
problems if the motion UNintentionally does not match the pose. Use
gePose_MatchesgeMotionExactly() to test for an exact name-based match.
![]()
Constants:
#define GE_POSE_ROOT_JOINT (-1)
Return to Contents
![]()
Types:
Return to Contents
gePose;
NOTE: The contents of this structure have been intentionally left out of the interface, by the designers of this module. Think of this as a handle only.
Return to Contents
![]()
Functions:
![]()
gePose* GENESISCC gePose_Create(void);
Creates a new pose with no joints.
Return to Contents
![]()
Destroys an existing pose.
Return to Contents
![]()
geBoolean GENESISCC gePose_AddJoint(gePose* P, int ParentJointIndex, const char * JointName, const geXForm3d* Attachment, int * JointIndex);
Adds a new joint to a pose.
Return to Contents
![]()
Retrieves current joint attachment scaling factors
Return to Contents
![]()
Scales all joint attachments by component scaling factors in Scale
Return to Contents
![]()
geBoolean GENESISCC gePose_FindNamedJointIndex(const gePose* P, const char * JointName, int * Index);
Returns the index of a joint named JointName. Returns GE_TRUE if it is
located, and Index is set. Returns GE_FALSE if not, and Index is not changed.
Return to Contents
![]()
returns the number of joints in the pose
Return to Contents
![]()
geBoolean GENESISCC gePose_MatchesMotionExactly(const gePose* P, const geMotion* M);
Return to Contents
![]()
Return to Contents
![]()
set the pose according to a motion. Use the motion at time 'Time'.
if the motion does not describe motion for all joints, name-based resolution
will be used to decide which motion to attach to which joints.
joints that are unaffected are unchanged.
if Transform is non-BasetypesIndexed.htm - NULLNULL, it is applied to the Motion
Return to Contents
![]()
optimization: if this is called, then all pose computations are limited to the BoneIndex'th bone, and
it's parents (including the root bone). This is true for all queries until an entire motion is set or blended
into the pose.
Return to Contents
![]()
blend in the pose according to a motion. Use the motion at time 'Time'.
the blending is between the 'current' pose and the pose described by the motion.
a BlendAmount of 0 will result in the 'current' pose, and a BlendAmount of 1.0
will result in the pose according to the new motion.
if the motion does not describe motion for all joints, name-based resolution
will be used to decide which motion to attach to which joints.
joints that are unaffected are unchanged.
if Transform is non-BasetypesIndexed.htm - NULLNULL, it is applied to the Motion prior to blending
Return to Contents
![]()
get a joint's current transform (relative to world space)
Return to Contents
![]()
get the transforms for the entire pose.* TransformArray must not be changed.
Return to Contents
![]()
query a joint's current transform relative to it's attachment to it's parent.
Return to Contents
![]()
adjust a joint's current transform relative to it's attachment to it's parent.
this is like setting a mini-motion into this joint only: this will only affect
the current pose
Return to Contents
![]()
query how a joint is attached to it's parent. (it's base attachment)
Return to Contents
![]()
adjust how a joint is attached to it's parent. These changes are permanent: all
future pose motions will incorporate this joint's new relation to it's parent* /
Return to Contents
![]()
Return to Contents
![]()
geBoolean GENESISCC gePose_Attach(gePose* Slave, int SlaveBoneIndex, gePose* Master, int MasterBoneIndex, const geXForm3d* Attachment);
Return to Contents
![]()
Return to Contents
![]()
GENESISCC gePose_ClearCoverage(gePose* P, int ClearTo);
a pose can also maintain a record of which joints are touched by a given motion.
these funtions set,clear and query the record.
ClearCoverage clears the coverage flag for all joints
Return to Contents
![]()
GENESISCC gePose_AccumulateCoverage(gePose* P, const geMotion* M, geBoolean QueryOnly);
AccumulateCoverage returns the number of joints that are not already 'covered'
that will be affected by a motion M,
if QueryOnly is GE_FALSE, affected joints are tagged as 'covered', otherwise no changes
are made to the joint coverage flags.
Return to Contents
![]()