Public Member Functions | Public Attributes

FBCharacterSolver Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014.


Search for all occurrences

Detailed Description

Constraint class.

Definition at line 115 of file fbcharactersolver.h.

#include <fbcharactersolver.h>

Inheritance diagram for FBCharacterSolver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBCharacterSolver (const char *pName, HIObject pObject=NULL)
 Constructor.
 IObject_Declare (K_IMPLEMENTATION)
FBEvaluateInfoBackgroundEvaluateInfoBegin (FBEvaluateInfo *pSourceEvaluateInfo, bool pEvaluateCandidates=false)
 Start background evaluation.
FBEvaluateInfoBackgroundEvaluateInfoRecursiveBegin (FBEvaluateInfo *pSourceEvaluateInfo, bool pForceUpdateLocals=false)
 Start recursive background evaluation.
void BackgroundEvaluateInfoEnd (FBEvaluateInfo *pBackgroundEvaluateInfo)
 Release background evaluation info - very important.
bool BackgroundEvaluateInfoNotify (FBEvaluateInfo *pBackgroundEvaluateInfo, kBackgroundEvaluationCallback pFunction, void *pCustomData=NULL)
 Enable evaluation notification.
void ResetConnectorSetup ()
virtual
FBCharacterManipulatorCtrlSet
CreateCharacterManipulatorCtrlSet (const char *pName)
virtual double GetCharacterSolverVersion ()
 Version of the solver. Needs to be overloaded in derived class.
virtual int GetExtraFKCount ()
 Return number of extra FK model (ex.
virtual const char * GetExtraFKNameAt (int pIndex)
 Return the specified extra FK Name (ex.
virtual FBBodyPartId GetExtraFKBodyPartAt (int pIndex)
 Return The specified extra FK BodyPart (ex.
virtual int GetExtraBoneCount ()
 Return number of extra Bone model (ex.
virtual const char * GetExtraBoneNameAt (int pIndex)
 Return The specified extra Bone name (ex.
virtual FBBodyPartId GetExtraBoneBodyPartAt (int pIndex)
 Return The specified extra Bone BodyPart (ex.
FBModelGetExtraBoneModelAt (int pIndex)
 Return The specified extra Bone model (ex.
FBModelMarkerGetExtraFKModelAt (int pIndex)
 Return the specified extra FK model (ex.
void SetExtraBoneModelAt (FBModel *pModel, int pIndex)
 Set the specified extra Bone model for a specified Extra Bone Index.
void SetExtraFKModelAt (FBModelMarker *pModel, int pIndex)
 Set the specified extra FK model for a specified Extra FK Index (ex.
void ExtractOffsets ()
 Extract Transforms Of Extra Bones for character stance pose information.
void GetTransformOffset (FBVector3d &pT, FBRVector &pR, FBSVector &pS, int pIndex)
 Get the transform of the Given Extra Bone Index.
void SetTransformOffset (FBVector3d &pT, FBRVector &pR, FBSVector &pS, int pIndex)
 Set the transform of the Given Extra Bone Index.
void GetParentRotationOffset (FBRVector &pR, int pIndex)
 Get the Parent Rotation Offset of the Given Extra Bone Index.
void SetParentRotationOffset (FBRVector &pR, int pIndex)
 Set the Parent Rotation Offset of the Given Extra Bone Index.
virtual void CharacterPasteState (FBCharacter *pFromCharacter, FBCharacterPose *pPose, FBCharacterPoseOptions &pCharacterPoseOptions)
 Paste the state of a character on another one.
virtual void ResetExtraProperties ()
 Support for resetting properties that are defined and specific to custom solver Override this function in derived class so that these 'extra' properties can be reset (e.g., to default values) when "Reset All Properties" button in "Character Settings" tab in Navigator is clicked, or when FBCharacter::ResetProperties() is called.
bool GetRigAlign ()
 Returns true when control rig has Rig Align property on.
bool GetDoubleSolve ()
 Returns true when control rig has Double Solve property on.

Public Attributes

int mEvaluationId
 Last Evaluation Id.
FBPropertyCharacter TargetCharacter
 Read Write Property: The character being constrained.
FBPropertyComponent Source
 Read Write Property: Source character when doing a character retarget.

Constructor & Destructor Documentation

FBCharacterSolver ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of constraint.
pObjectFor internal use only (default is NULL).

Member Function Documentation

IObject_Declare ( K_IMPLEMENTATION  )
FBEvaluateInfo* BackgroundEvaluateInfoBegin ( FBEvaluateInfo pSourceEvaluateInfo,
bool  pEvaluateCandidates = false 
)

Start background evaluation.

Needs to be released as soon as possible.

Parameters:
pSourceEvaluateInfoSource evaluation. Needs to be valid one.
pEvaluateCandidatesNotify that we want to be able to resolve candidates - this can be called only from main thread (on other threads won't work)
Returns:
Background evaluation info that will work with new ID and in secured buffers.
Note:
Example of usage can be found in /OpenRealitySDK/Samples/constraints/CharacterSolver/HIK2014Solver
FBEvaluateInfo* BackgroundEvaluateInfoRecursiveBegin ( FBEvaluateInfo pSourceEvaluateInfo,
bool  pForceUpdateLocals = false 
)

Start recursive background evaluation.

Needs to be released as soon as possible.

Parameters:
pSourceEvaluateInfoSource evaluation. Needs to be valid one.
pForceUpdateLocalsEvaluate local transformation, even if only global was requested
Returns:
Background evaluation info that will work with new ID and in secured buffers.
Note:
Example of usage can be found in /OpenRealitySDK/Samples/constraints/CharacterSolver/HIK2014Solver
void BackgroundEvaluateInfoEnd ( FBEvaluateInfo pBackgroundEvaluateInfo)

Release background evaluation info - very important.

bool BackgroundEvaluateInfoNotify ( FBEvaluateInfo pBackgroundEvaluateInfo,
kBackgroundEvaluationCallback  pFunction,
void *  pCustomData = NULL 
)

Enable evaluation notification.

Parameters:
pBackgroundEvaluateInfoBackground evaluation that was started for this object and for which we want to change enable/disable notification callback
pFunctionCallback function, will be called when FBAnimationNode of this constraint is being evaluated. Passing NULL disable notification.
pCustomDataCustomer can pass custom data to callback.
Returns:
Confirms that change was made to pBackgroundEvaluateInfo
Note:
Example of usage can be found in /OpenRealitySDK/Samples/constraints/CharacterSolver/IK2014Solver
void ResetConnectorSetup ( )
virtual FBCharacterManipulatorCtrlSet* CreateCharacterManipulatorCtrlSet ( const char *  pName) [virtual]
virtual double GetCharacterSolverVersion ( ) [inline, virtual]

Version of the solver. Needs to be overloaded in derived class.

Definition at line 166 of file fbcharactersolver.h.

{ return 1.0; };
virtual int GetExtraFKCount ( ) [inline, virtual]

Return number of extra FK model (ex.

extra shoulder)

Returns:
number of extra FK.

Definition at line 171 of file fbcharactersolver.h.

{ return 0; }
virtual const char* GetExtraFKNameAt ( int  pIndex) [inline, virtual]

Return the specified extra FK Name (ex.

extra shoulder)

Parameters:
pIndexIndex of extra FK to get.
Returns:
Name corresponding to FK index.

Definition at line 176 of file fbcharactersolver.h.

{ return NULL; }
virtual FBBodyPartId GetExtraFKBodyPartAt ( int  pIndex) [inline, virtual]

Return The specified extra FK BodyPart (ex.

Left Arm )

Parameters:
pIndexIndex of extra Bone to get.
Returns:
BodyPart associated with this model.

Definition at line 181 of file fbcharactersolver.h.

{ return kFBCtrlSetPartNone; }
virtual int GetExtraBoneCount ( ) [inline, virtual]

Return number of extra Bone model (ex.

extra shoulder)

Returns:
number of extra Bone.

Definition at line 185 of file fbcharactersolver.h.

{ return 0; }
virtual const char* GetExtraBoneNameAt ( int  pIndex) [inline, virtual]

Return The specified extra Bone name (ex.

extra shoulder)

Parameters:
pIndexIndex of extra Bone to get.
Returns:
Name corresponding to Bone index.

Definition at line 190 of file fbcharactersolver.h.

{ return NULL; }
virtual FBBodyPartId GetExtraBoneBodyPartAt ( int  pIndex) [inline, virtual]

Return The specified extra Bone BodyPart (ex.

Left Arm )

Parameters:
pIndexIndex of extra Bone to get.
Returns:
BodyPart associated with this model.

Definition at line 195 of file fbcharactersolver.h.

{ return kFBCtrlSetPartNone; }
FBModel* GetExtraBoneModelAt ( int  pIndex)

Return The specified extra Bone model (ex.

extra shoulder)

Parameters:
pIndexIndex of extra Bone to get.
Returns:
FBModel corresponding to Bone index.
FBModelMarker* GetExtraFKModelAt ( int  pIndex)

Return the specified extra FK model (ex.

extra shoulder)

Parameters:
pIndexIndex of extra FK to get.
Returns:
FBModel corresponding to FK index.
void SetExtraBoneModelAt ( FBModel pModel,
int  pIndex 
)

Set the specified extra Bone model for a specified Extra Bone Index.

(ex. extra shoulder)

Parameters:
pModelExtra Bone Model used for characterization.
pIndexIndex of extra Bone to set.
void SetExtraFKModelAt ( FBModelMarker pModel,
int  pIndex 
)

Set the specified extra FK model for a specified Extra FK Index (ex.

extra shoulder)

Parameters:
pModelExtra FK Model used for character Rig
pIndexIndex of extra FK to set.
void ExtractOffsets ( )

Extract Transforms Of Extra Bones for character stance pose information.

void GetTransformOffset ( FBVector3d pT,
FBRVector pR,
FBSVector pS,
int  pIndex 
)

Get the transform of the Given Extra Bone Index.

The transorm is the Global Transform extracted at Characterisation (in Stance Pose)

Parameters:
pTreturn Global Translation in Stance Pose.
pRreturn Global Rotation in Stance Pose.
pSreturn Global Scaling in Stance Pose.
pIndexIndex of extra Bone to get.
void SetTransformOffset ( FBVector3d pT,
FBRVector pR,
FBSVector pS,
int  pIndex 
)

Set the transform of the Given Extra Bone Index.

The transorm is the Global Transform extracted at Characterisation (in Stance Pose)

Parameters:
pTGlobal Translation to set for the Stance Pose.
pRGlobal Rotation to set for the Stance Pose.
pSGlobal Scaling to set for the Stance Pose.
pIndexIndex of extra Bone to set.
void GetParentRotationOffset ( FBRVector pR,
int  pIndex 
)

Get the Parent Rotation Offset of the Given Extra Bone Index.

The rotation Offset if extracted at Characterisation (in Stance Pose). You don't need this value if the parent of the bone is characterized too.

Parameters:
pROffset Rotation between the Bone and is parent at Stance Pose.
pIndexIndex of extra Bone to get.
void SetParentRotationOffset ( FBRVector pR,
int  pIndex 
)

Set the Parent Rotation Offset of the Given Extra Bone Index.

The rotation Offset if extracted at Characterisation (in Stance Pose). You don't need this value if the parent of the bone is characterized too.

Parameters:
pROffset Rotation between the Bone and is parent at Stance Pose.
pIndexIndex of extra Bone to get.
virtual void CharacterPasteState ( FBCharacter pFromCharacter,
FBCharacterPose pPose,
FBCharacterPoseOptions pCharacterPoseOptions 
) [inline, virtual]

Paste the state of a character on another one.

Parameters:
pFromCharacterCharacter with the state that we want to paste.
pPosePose object containing the pose.
pCharacterPoseOptionsPose options to use with this paste.

Definition at line 260 of file fbcharactersolver.h.

{}
virtual void ResetExtraProperties ( ) [inline, virtual]

Support for resetting properties that are defined and specific to custom solver Override this function in derived class so that these 'extra' properties can be reset (e.g., to default values) when "Reset All Properties" button in "Character Settings" tab in Navigator is clicked, or when FBCharacter::ResetProperties() is called.

Definition at line 266 of file fbcharactersolver.h.

{};
bool GetRigAlign ( )

Returns true when control rig has Rig Align property on.

bool GetDoubleSolve ( )

Returns true when control rig has Double Solve property on.


Member Data Documentation

Last Evaluation Id.

Definition at line 129 of file fbcharactersolver.h.

FBPropertyCharacter TargetCharacter

Read Write Property: The character being constrained.

Definition at line 130 of file fbcharactersolver.h.

Read Write Property: Source character when doing a character retarget.

Definition at line 131 of file fbcharactersolver.h.


The documentation for this class was generated from the following file:

FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver
FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver FBCharacterSolver