1 #ifndef __FBCONSTRAINT_H__
2 #define __FBCONSTRAINT_H__
50 #define FBSDK_DLL K_DLLIMPORT
56 #ifdef FBSDKUseNamespace
69 #define FBRegisterConstraint( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
70 HIObject RegisterConstraint##ClassName##Create( HIObject ,const char* pName,void * ) \
72 ClassName *Class = new ClassName(pName); \
73 Class->UniqueName = UniqueNameStr; \
74 if (Class->FBCreate()) { \
75 return Class->GetHIObject(); \
82 FBLibraryModule( ClassName ) \
84 FBRegisterObject( ClassName##R1,"Constraints",Label,Description,RegisterConstraint##ClassName##Create,true, IconFilename ); \
85 FBRegisterObject( ClassName##R2,"FbxStorable/Constraint",UniqueNameStr,Description,RegisterConstraint##ClassName##Create,true, IconFilename ); \
93 #define FBConstraintDeclare( ClassName, Parent ) \
94 FBClassDeclare( ClassName, Parent ); \
96 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
102 #define FBConstraintImplementation( ThisComponent ) \
103 FBClassImplementation( ThisComponent )
120 bool GetSnapRequested();
125 bool GetZeroRequested();
145 virtual void ActiveChanged();
147 virtual void RemoveAllAnimationNodes();
148 virtual void SetupAllAnimationNodes();
150 virtual void SnapSuggested();
151 virtual void FreezeSuggested();
157 virtual bool Disable(
FBModel* pModel );
163 virtual bool Enable(
FBModel* pModel );
200 virtual void SaveModelState(
FBModel* pModel,
bool pS,
bool pR,
bool pT );
205 virtual void RestoreModelState(
FBModel* pModel );
213 virtual void FreezeSRT(
FBModel* pModel,
bool pS,
bool pR,
bool pT );
223 int ReferenceGroupGetCount();
230 int ReferenceGroupAdd(
const char* pGroupName,
int pMaxItemCount );
236 const char* ReferenceGroupGetName(
int pGroupIndex );
243 int ReferenceGroupGetMaxCount(
int pGroupIndex );
250 FBModel* ReferenceGet(
int pGroupIndex,
int pItemIndex=0 );
256 int ReferenceGetCount(
int pGroupIndex );
265 bool ReferenceAdd(
int pGroupIndex,
FBModel* pModel );
272 bool ReferenceRemove(
int pGroupIndex,
FBModel* pModel );
275 void ReferenceRemoveAll();
283 virtual bool ReferenceAddNotify (
int pGroupIndex,
FBModel* pModel );
284 virtual bool ReferenceRemoveNotify (
int pGroupIndex,
FBModel* pModel );
321 virtual bool DeformerBind (
FBModel* pModel );
322 virtual bool DeformerUnBind (
FBModel* pModel );
380 virtual void RemoveAt(
int pIndex );
385 virtual FBBox* operator[](
int pIndex);
389 virtual int GetCount();
391 #ifndef DOXYGEN_SHOULD_SKIP_THIS
476 FBBox* ConstrainObject(
FBBox* pConstrainedObject );
484 FBBox* CreateFunctionBox(
const char* pGroup,
const char* pName );
494 bool GetBoxPosition(
FBBox* pBox,
int& pX,
int& pY );
503 bool SetBoxPosition(
FBBox* pBox,
int pX,
int pY );
520 #define FBRegisterConstraintSolver( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
521 HIObject RegisterConstraintSolver##ClassName##Create( HIObject ,const char* pName,void * ) \
523 ClassName *Class = new ClassName(pName); \
524 Class->UniqueName = UniqueNameStr; \
525 if (Class->FBCreate()) { \
526 return Class->GetHIObject(); \
533 FBLibraryModule( ClassName ) \
535 FBRegisterObject( ClassName##R1,"Browsing/Templates/Solvers",Label,Description,RegisterConstraintSolver##ClassName##Create,true, IconFilename ); \
536 FBRegisterObject( ClassName##R2,"FbxStorable/Constraint",UniqueNameStr,Description,RegisterConstraintSolver##ClassName##Create,true, IconFilename ); \
544 #define FBConstraintSolverDeclare( ClassName, Parent ) \
545 FBClassDeclare( ClassName, Parent ); \
547 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
553 #define FBConstraintSolverImplementation( ThisComponent ) \
554 FBClassImplementation( ThisComponent )
584 void BackgroundEvaluateInfoEnd(
FBEvaluateInfo* pBackgroundEvaluateInfo);
595 void MultiThreaded(
bool pActive );
596 bool IsMultiThreaded();
601 virtual void LiveChanged();
633 #define FBRegisterPhysicalProperties( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
634 HIObject RegisterPhysicalProperties##ClassName##Create( HIObject ,const char* pName,void * ) \
636 ClassName *Class = new ClassName(pName); \
637 if (Class->FBCreate()) { \
638 return Class->GetHIObject(); \
645 FBLibraryModule( ClassName ) \
647 FBRegisterObject( ClassName##R1,"Browsing/Templates/Physical Properties",Label,Description,RegisterPhysicalProperties##ClassName##Create,true, IconFilename ); \
648 FBRegisterObject( ClassName##R2,"FbxStorable/Physical Properties",UniqueNameStr,Description,RegisterPhysicalProperties##ClassName##Create,true, IconFilename ); \
656 #define FBPhysicalPropertiesDeclare( ClassName, Parent ) \
657 FBClassDeclare( ClassName, Parent ); \
659 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
665 #define FBPhysicalPropertiesImplementation( ThisComponent ) \
666 FBClassImplementation( ThisComponent )
717 static FBConstraintManager& TheOne();
725 const char* TypeGetName (
int pTypeIndex )
const;
730 int TypeGetCount ()
const;
748 FBConstraint* TypeCreateConstraint(
const char* pName );
752 #ifdef FBSDKUseNamespace
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBPropertyAction Snap
Function Property: Snap constraint.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Base class for constraints.
FBPropertyBool Deformer
Read Write Property: Is a deformer constraint?
class FBPropertyBaseAnimatable< double, kFBPT_double > FBPropertyAnimatableDouble
FBPropertyBaseAnimatableDouble type definition.
FBPropertyBool UseGlobalTransforms
Read Write Property: Indicate if the translations are expressed in local or global mode...
PropertyList: Physical properties
FBPropertyBox Box
Read Only Property: Underlying box object.
AnimationNodeNotify evaluation information.
Contains definitions for devices, boxes and models.
Constraint information class.
#define IObject_Declare(IsPure)
Property class: const char * (String).
FBPropertyBool SyncAnimationPlay
Read Write Property: Sync animation play speed with solver? (for computation expensive scenes this wi...
MotionBuilder SDK base class.
FBPropertyModel Model
Read Only Property: Underlying model object.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Base class for constraint solver.
Property: Action Action property to trigger function.
FBPropertyListBox Boxes
List: Boxes used in this constraint.
PropertyList: Concrete class for PropertyList of component
class FBVector4< float > FBVertex
Vertex.
List: Box informations for constraint relation.
ConstraintRelation class.
void(* kBackgroundEvaluationCallback)(const FBAnimationNode *pDst, const FBAnimationNode *pSrc, void *pCustomData)
Background Notification Function.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyAnimatableDouble Weight
Read Write Property: Weight of constraint.
Property: Base property class.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class FBVector3< double > FBVector3d
3D vector.
FBPropertyString Description
Read Write Property: Long description of constraint.
Wrapper around a specific instance of a FBModel object.
class FBPropertyBaseComponent< FBModel * > FBPropertyModel
#define FBSDKNamespace
FBSDKNamespace define.
FBPropertyBool Lock
Read Write Property: Lock state.
Base class for physical properties attach to a model.
PropertyList: Constraint solver
A box is a fundamental building block in the application architecture.
#define K_DEPRECATED_2014
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Wrapper around a specific instance of a FBBox object.
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
FBPropertyInt SampleRecordingPrecision
Read Write Property: Sample Recording Precision?
FBPropertyBool Active
Read Write Property: Active state.
FBPropertyBool HasLayout
Read Write Property: Does the constraint have a layout?
class FBPropertyBaseComponent< FBBox * > FBPropertyBox