1#ifndef __FBCHARACTERMANIPULATOR_H__
2#define __FBCHARACTERMANIPULATOR_H__
43#include <kaydaradef.h>
48 #define FBSDK_DLL K_DLLIMPORT
55#ifdef FBSDKUseNamespace
56 namespace FBSDKNamespace {
298#define FBCharacterManipulatorCtrlSetDeclare( ClassName, Parent ) \
299 FBClassDeclare( ClassName, Parent ); \
301 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
307#define FBCharacterManipulatorCtrlSetImplementation( ThisComponent ) \
308 FBClassImplementation( ThisComponent )
482#ifdef FBSDKUseNamespace
A character is the link between a motion source and a character model.
bool IsIKPivotUse()
Determine if IK pivot are used when manipualting a character.
virtual void ScalingStopManipulation() override
Called when the manipulation is finished.
bool IsReachOverride()
Determine if the reach override option is enable for the manipulated character.
FBCharacter * GetCharacter()
Returns the character being manipulated.
virtual void DeallocateState()
Override this method to deallocate the state allocate in the AllocateState() function.
float GetEffectorReachTValue(int pEffectorId)
Get the reach T (IK Blend T since MotionBuilder 2013) value for a specified effector on the current m...
void TranslationStopManipulation() override
Called when the manipulation is finished.
virtual FBManipulationStartResult ScalingStartManipulation(FBReferencialType pRefType) override
Called to determine if the manipulation can be done.
virtual void AllocateState(FBCharacter *pCharacter)
Override this method to allocate the necessary state requires when manipulating a character.
virtual FBManipulationGetResult ScalingIsEditable(bool &pEditable) override
Returned value will indicate if a scaling manipulation can be done.
FBEffectorId GetManipulatedEffectorIdForRotation()
Find the index of the currently manipulated effector for Rotation Only.
float GetEffectorPullValue(int pEffectorId)
Get the pull (IK Pull since MotionBuilder 2013) value for a specified effector on the current manipul...
void SetEffectorPullValue(int pEffectorId, float pValue)
Set the pull (IK Pull since MotionBuilder 2013) value for a specified effector on the current manipul...
FBBodyNodeId GetManipulatedBodyNode()
Find the index of the currently manipulated effector set.
FBEffectorSetID GetEffectorSet()
Find the index of the currently manipulated effector set.
virtual FBManipulationGetResult ScalingGet(FBSVector &pS, FBReferencialType pRefType) override
Get the scale manipulator position.
virtual FBManipulationGetResult RotationIsEditable(bool &pEditable, FBReferencialType pRefType) override
Returned value will indicate if a rotation manipulation can be done.
virtual FBManipulationStartResult RotationStartManipulation(FBReferencialType pRefType) override
Called to determine if the manipulation can be done.
virtual FBManipulationSetResult RotationSet(FBMatrix &pRM, FBReferencialType pRefType, FBSetType pSetType, bool pOnlyRoot=false) override
Set the value of the translation to the manipulated model.
virtual FBManipulationStartResult TranslationStartManipulation(FBReferencialType pRefType, const FBTime *pTime=NULL) override
Called to determine if the manipulation can be done.
void TranslationSetGlobal(FBTVector pVector, int pEffectorId)
Set the translation for the specified effector on the current manipulated character in global coordin...
bool IsFullBodyNoPull()
Determine if the character is in Full Body - No Pull keying mode.
bool IsDescendantPulling(FBEffectorId pEffectorId)
Determine if one of the effector's child has a IK Pull value bigger than 0.5 on the current manipulat...
virtual FBManipulationGetResult TranslationGet(FBTVector &pT, FBReferencialType pRefType, FBManipPivot pPivot=FBManipPivotObjectTranslation) override
Get the translation manipulator position.
void SetEffectorReachTValue(int pEffectorId, float pValue)
Set the reach T (IK Blend T since MotionBuilder 2013) value for a specified effector on the current m...
virtual FBManipulationSetResult ScalingSet(FBSVector &pS, FBReferencialType pRefType, FBSetType pSetType, FBSetWhat pSetWhat) override
Set the value of the scale to the manipulated model.
virtual void RotationStopManipulation() override
Called when the manipulation is finished.
FBEffectorId GetDescendantEffector(FBEffectorId pEffectorId, int pIndex)
Return the child effector for the provided effector.
FBEffectorId GetManipulatedEffectorIdForTranslation()
Find the index of the currently manipulated effector For Translation.
virtual FBManipulationGetResult RotationGet(FBMatrix &pRM, FBReferencialType pRefType) override
Get the rotation manipulator position.
bool IsFullBody()
Determine if the character is in Full Body keying mode.
bool IsStiffnessOverride()
Determine if the stiffness override option is enable for the manipulated character.
virtual FBManipulationGetResult TranslationIsEditable(bool &pEditable, FBReferencialType pRefType) override
Returned value will indicate if a translation manipulation can be done.
FBCharacterManipulatorCtrlSet(const char *pName, HIObject pObject=NULL)
Constructor.
int GetDescendantEffectorCount(FBEffectorId pEffectorId)
Return the child effector count of the provided effector based on the skeleton hierarchy.
FBEffectorId GetManipulatedEffectorId()
Find the index of the currently manipulated effector for Translation or Rotation depending of Mode.
bool IsBodyPart()
Determine if the character is in Body Part keying mode.
void TranslationSetLocal(FBTVector pVector, int pEffectorId)
Set the translation for the specified effector on the current manipulated character in local coordina...
virtual void SyncCharacter(FBEvaluateInfo *pEvalInfo)
Synchronize the character after doing a manipulation using this function.
virtual FBManipulationSetResult TranslationSet(FBTVector &pT, FBReferencialType pRefType, FBSetType pSetType, FBSetWhat pSetWhat) override
Set the value of the translation to the manipulated model.
Character Manipulator class.
virtual FBManipulationGetResult TranslationGet(FBTVector &pT, FBReferencialType pRefType, FBManipPivot pPivot=FBManipPivotObjectTranslation)=0
Get the translation manipulator position.
FBCharacterManipulator(const char *pName, HIObject pObject=NULL)
Constructor.
virtual void ScalingStopManipulation()=0
Called when the manipulation is finished.
virtual FBManipulationGetResult RotationGet(FBMatrix &pRM, FBReferencialType pRefType)=0
Get the rotation manipulator position.
virtual FBManipulationStartResult RotationStartManipulation(FBReferencialType pRefType)=0
Called to determine if the manipulation can be done.
FBModel * GetManipulatedNode()
return the manipulated Model
virtual FBManipulationGetResult TranslationIsEditable(bool &pEditable, FBReferencialType pRefType)=0
Returned value will indicate if a translation manipulation can be done.
virtual FBManipulationSetResult ScalingSet(FBSVector &pS, FBReferencialType pRefType, FBSetType pSetType, FBSetWhat pSetWhat)=0
Set the value of the scale to the manipulated model.
virtual void RotationStopManipulation()=0
Called when the manipulation is finished.
virtual FBManipulationSetResult RotationSet(FBMatrix &pRM, FBReferencialType pRefType, FBSetType pSetType, bool pOnlyRoot=false)=0
Set the value of the translation to the manipulated model.
virtual FBManipulationSetResult TranslationSet(FBTVector &pT, FBReferencialType pRefType, FBSetType pSetType, FBSetWhat pSetWhat)=0
Set the value of the translation to the manipulated model.
FBManipMode GetManipulatorMode()
return the manipulator Mode
virtual FBManipulationGetResult ScalingGet(FBSVector &pS, FBReferencialType pRefType)=0
Get the scale manipulator position.
virtual FBManipulationStartResult TranslationStartManipulation(FBReferencialType pRefType, const FBTime *pTime=NULL)=0
Called to determine if the manipulation can be done.
virtual FBManipulationGetResult ScalingIsEditable(bool &pEditable)=0
Returned value will indicate if a scaling manipulation can be done.
virtual FBManipulationStartResult ScalingStartManipulation(FBReferencialType pRefType)=0
Called to determine if the manipulation can be done.
virtual void TranslationStopManipulation()=0
Called when the manipulation is finished.
virtual FBManipulationGetResult RotationIsEditable(bool &pEditable, FBReferencialType pRefType)=0
Returned value will indicate if a rotation manipulation can be done.
bool IsReleasePinPressed()
Call this to know if the Button Release is on when manipulating.
MotionBuilder SDK base class.
AnimationNodeNotify evaluation information.
Four x Four (double) Matrix.
Three dimensional scaling vector.
Contains definitions for actors, characters, and marker sets In Development.
FBEffectorId
All effector nodes.
FBEffectorSetID
Effector ID identifier.
FBBodyNodeId
All body nodes.
FBSetType
Specify what to do with the provided value.
@ FBSetTypeExact
Set the value directly.
@ FBSetTypeNone
Do nothing with the value.
@ FBSetTypeCumulative
Add the provided value to the original value.
FBReferencialType
Specify the referential when a manipulation function is called.
@ FBRefTypeNone
No type specified.
@ FBRefTypeParent
Parenting mode.
@ FBRefTypeLocal
Referential is in local coordinate.
@ FBRefTypeGlobal
Referential is in global coordinate.
@ FBRefTypeLayer
Local additive rotation.
@ FBRefTypeSumLayers
Global additive rotation.
FBManipMode
Manipulator Mode.
@ FBManip_EditorRotation
Rotation Manipulation Mode.
@ FBManip_EditorScaling
Scaling Manipulation Mode.
@ FBManip_EditorTranslation
Translation Manipulation Mode.
@ FBManip_EditorOther
Unknown Manipulation Mode.
FBManipPivot
Specify how the pivot should be interpreted.
@ FBManipPivotObjectRotation
Consider the rotation of the pivot.
@ FBManipPivotObjectUnknown
Don't consider the pivot.
@ FBManipPivotObjectScaling
Consider the scaling of the pivot.
@ FBManipPivotObjectTranslation
Consider the translation of the pivot.
FBManipulationStartResult
Manipulation Start Result.
@ kFBManipulationOK
This is the default value to return, means that you will handle the manipulation.
@ kFBManipulationOKNoUndo
This value means that the manipulation will be done, but the manipulation will not be undoable.
@ kFBManipulationRefuse
Manipulation will be skipped.
FBSetWhat
Specify what part of the provided value should be used.
@ FBSetWhatX
Set only the X component of the value.
@ FBSetWhatNone
Do nothing with the value.
@ FBSetWhatZ
Set only the Z component of the value.
@ FBSetWhatY
Set only the Y component of the value.
@ FBSetWhatXYZ
Set the XYZ components of the value.
@ FBSetWhatAll
Set all components of the value.
FBManipulationSetResult
Manipulation Set Result.
@ kFBManipulationSetFail
Return this value when you have set the value.
@ kFBManipulationSetContinue
Return this value when you don't want handle the request, another manipulator will try to handle it.
FBManipulationGetResult
Manipulation Get Result.
@ kFBManipulationGetFail
Return this value to prevent other manipulator to handle the request.
@ kFBManipulationGetContinue
Return this value when you cannot provided the requested value, another manipulator will try to provi...
@ kFBManipulationGetDone
Return this value when you can provided the requested value.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Contains definitions for devices, boxes and models.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.