fbcharacter.h

Go to the documentation of this file.
00001 #ifndef __FBCHARACTER_H__
00002 #define __FBCHARACTER_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00046 #include <kaydaradef.h>
00047 #ifndef FBSDK_DLL 
00048 
00051     #define FBSDK_DLL K_DLLIMPORT
00052 #endif
00053 
00054 #include <fbsdk/fbconstraint.h>
00055 
00056 #include <fbsdk/fbcharacterextension.h>
00057 
00058 #ifdef FBSDKUseNamespace
00059     namespace FBSDKNamespace {
00060 #endif
00061 
00062 class FBCharacterSolver;
00063 
00065 enum FBSkeletonNodeId
00066 {   
00067     kFBSkeletonInvalidIndex = -1, 
00068     kFBSkeletonHipsIndex = 0, 
00069     kFBSkeletonLeftHipIndex,
00070     kFBSkeletonLeftKneeIndex,
00071     kFBSkeletonLeftAnkleIndex,
00072     kFBSkeletonLeftFootIndex,
00073     kFBSkeletonRightHipIndex,
00074     kFBSkeletonRightKneeIndex,
00075     kFBSkeletonRightAnkleIndex,
00076     kFBSkeletonRightFootIndex,
00077     kFBSkeletonWaistIndex,
00078     kFBSkeletonChestIndex,
00079     kFBSkeletonLeftCollarIndex,
00080     kFBSkeletonLeftShoulderIndex,
00081     kFBSkeletonLeftElbowIndex,
00082     kFBSkeletonLeftWristIndex,
00083     kFBSkeletonRightCollarIndex,
00084     kFBSkeletonRightShoulderIndex,
00085     kFBSkeletonRightElbowIndex,
00086     kFBSkeletonRightWristIndex,
00087     kFBSkeletonNeckIndex,
00088     kFBSkeletonHeadIndex,
00089     kFBSkeletonLeftThumbAIndex,
00090     kFBSkeletonLeftThumbBIndex,
00091     kFBSkeletonLeftThumbCIndex,
00092     kFBSkeletonLeftIndexAIndex,
00093     kFBSkeletonLeftIndexBIndex,
00094     kFBSkeletonLeftIndexCIndex,
00095     kFBSkeletonLeftMiddleAIndex,
00096     kFBSkeletonLeftMiddleBIndex,
00097     kFBSkeletonLeftMiddleCIndex,
00098     kFBSkeletonLeftRingAIndex,
00099     kFBSkeletonLeftRingBIndex,
00100     kFBSkeletonLeftRingCIndex,
00101     kFBSkeletonLeftPinkyAIndex,
00102     kFBSkeletonLeftPinkyBIndex,
00103     kFBSkeletonLeftPinkyCIndex,
00104     kFBSkeletonRightThumbAIndex,
00105     kFBSkeletonRightThumbBIndex,
00106     kFBSkeletonRightThumbCIndex,
00107     kFBSkeletonRightIndexAIndex,
00108     kFBSkeletonRightIndexBIndex,
00109     kFBSkeletonRightIndexCIndex,
00110     kFBSkeletonRightMiddleAIndex,
00111     kFBSkeletonRightMiddleBIndex,
00112     kFBSkeletonRightMiddleCIndex,
00113     kFBSkeletonRightRingAIndex,
00114     kFBSkeletonRightRingBIndex,
00115     kFBSkeletonRightRingCIndex,
00116     kFBSkeletonRightPinkyAIndex,
00117     kFBSkeletonRightPinkyBIndex,
00118     kFBSkeletonRightPinkyCIndex,
00119     kFBSkeletonReferenceIndex,
00120     kFBSkeletonLastIndex
00121 };
00122 
00124 enum FBBodyNodeId 
00125 {
00126     kFBInvalidNodeId = -1,
00127     kFBHipsNodeId = 0,             
00128     kFBLeftHipNodeId,              
00129     kFBLeftKneeNodeId,             
00130     kFBLeftAnkleNodeId,            
00131     kFBLeftFootNodeId,             
00132     kFBRightHipNodeId,             
00133     kFBRightKneeNodeId,            
00134     kFBRightAnkleNodeId,           
00135     kFBRightFootNodeId,            
00136     kFBWaistNodeId,             
00137     kFBChestNodeId,             
00138     kFBLeftCollarNodeId,           
00139     kFBLeftShoulderNodeId,         
00140     kFBLeftElbowNodeId,            
00141     kFBLeftWristNodeId,            
00142     kFBRightCollarNodeId,          
00143     kFBRightShoulderNodeId,        
00144     kFBRightElbowNodeId,           
00145     kFBRightWristNodeId,           
00146     kFBNeckNodeId,                 
00147     kFBHeadNodeId,                 
00148     kFBLeftHipRollNodeId,          
00149     kFBLeftKneeRollNodeId,         
00150     kFBRightHipRollNodeId,         
00151     kFBRightKneeRollNodeId,        
00152     kFBLeftShoulderRollNodeId,     
00153     kFBLeftElbowRollNodeId,        
00154     kFBRightShoulderRollNodeId,    
00155     kFBRightElbowRollNodeId,       
00156     kFBSpine2NodeId,               
00157     kFBSpine3NodeId,               
00158     kFBSpine4NodeId,               
00159     kFBSpine5NodeId,               
00160     kFBSpine6NodeId,               
00161     kFBSpine7NodeId,               
00162     kFBSpine8NodeId,               
00163     kFBSpine9NodeId,               
00164     kFBLeftThumbANodeId,           
00165     kFBLeftThumbBNodeId,           
00166     kFBLeftThumbCNodeId,           
00167     kFBLeftIndexANodeId,           
00168     kFBLeftIndexBNodeId,           
00169     kFBLeftIndexCNodeId,           
00170     kFBLeftMiddleANodeId,          
00171     kFBLeftMiddleBNodeId,          
00172     kFBLeftMiddleCNodeId,          
00173     kFBLeftRingANodeId,            
00174     kFBLeftRingBNodeId,            
00175     kFBLeftRingCNodeId,            
00176     kFBLeftPinkyANodeId,           
00177     kFBLeftPinkyBNodeId,           
00178     kFBLeftPinkyCNodeId,           
00179     kFBRightThumbANodeId,          
00180     kFBRightThumbBNodeId,          
00181     kFBRightThumbCNodeId,          
00182     kFBRightIndexANodeId,          
00183     kFBRightIndexBNodeId,          
00184     kFBRightIndexCNodeId,          
00185     kFBRightMiddleANodeId,         
00186     kFBRightMiddleBNodeId,         
00187     kFBRightMiddleCNodeId,         
00188     kFBRightRingANodeId,           
00189     kFBRightRingBNodeId,           
00190     kFBRightRingCNodeId,           
00191     kFBRightPinkyANodeId,          
00192     kFBRightPinkyBNodeId,          
00193     kFBRightPinkyCNodeId,          
00194     kFBReferenceNodeId,            
00195     // -- New bones for 2.0 --
00196     kFBLeftThumbInNodeId,          
00197     kFBLeftThumbDNodeId,           
00198     kFBLeftIndexInNodeId,          
00199     kFBLeftIndexDNodeId,           
00200     kFBLeftMiddleInNodeId,         
00201     kFBLeftMiddleDNodeId,          
00202     kFBLeftRingInNodeId,           
00203     kFBLeftRingDNodeId,            
00204     kFBLeftPinkyInNodeId,          
00205     kFBLeftPinkyDNodeId,           
00206     kFBRightThumbInNodeId,         
00207     kFBRightThumbDNodeId,          
00208     kFBRightIndexInNodeId,         
00209     kFBRightIndexDNodeId,          
00210     kFBRightMiddleInNodeId,        
00211     kFBRightMiddleDNodeId,         
00212     kFBRightRingInNodeId,          
00213     kFBRightRingDNodeId,           
00214     kFBRightPinkyInNodeId,         
00215     kFBRightPinkyDNodeId,          
00216 
00217     kFBLeftExtraFingerInNodeId,    
00218     kFBLeftExtraFingerANodeId,     
00219     kFBLeftExtraFingerBNodeId,     
00220     kFBLeftExtraFingerCNodeId,     
00221     kFBLeftExtraFingerDNodeId,     
00222     kFBRightExtraFingerInNodeId,   
00223     kFBRightExtraFingerANodeId,    
00224     kFBRightExtraFingerBNodeId,    
00225     kFBRightExtraFingerCNodeId,    
00226     kFBRightExtraFingerDNodeId,    
00227 
00228     kFBLeftFootThumbInNodeId,      
00229     kFBLeftFootThumbANodeId,       
00230     kFBLeftFootThumbBNodeId,       
00231     kFBLeftFootThumbCNodeId,       
00232     kFBLeftFootThumbDNodeId,       
00233     kFBLeftFootIndexInNodeId,      
00234     kFBLeftFootIndexANodeId,       
00235     kFBLeftFootIndexBNodeId,       
00236     kFBLeftFootIndexCNodeId,       
00237     kFBLeftFootIndexDNodeId,       
00238     kFBLeftFootMiddleInNodeId,     
00239     kFBLeftFootMiddleANodeId,      
00240     kFBLeftFootMiddleBNodeId,      
00241     kFBLeftFootMiddleCNodeId,      
00242     kFBLeftFootMiddleDNodeId,      
00243     kFBLeftFootRingInNodeId,       
00244     kFBLeftFootRingANodeId,        
00245     kFBLeftFootRingBNodeId,        
00246     kFBLeftFootRingCNodeId,        
00247     kFBLeftFootRingDNodeId,        
00248     kFBLeftFootPinkyInNodeId,      
00249     kFBLeftFootPinkyANodeId,       
00250     kFBLeftFootPinkyBNodeId,       
00251     kFBLeftFootPinkyCNodeId,       
00252     kFBLeftFootPinkyDNodeId,       
00253     kFBRightFootThumbInNodeId,     
00254     kFBRightFootThumbANodeId,      
00255     kFBRightFootThumbBNodeId,      
00256     kFBRightFootThumbCNodeId,      
00257     kFBRightFootThumbDNodeId,      
00258     kFBRightFootIndexInNodeId,     
00259     kFBRightFootIndexANodeId,      
00260     kFBRightFootIndexBNodeId,      
00261     kFBRightFootIndexCNodeId,      
00262     kFBRightFootIndexDNodeId,      
00263     kFBRightFootMiddleInNodeId,    
00264     kFBRightFootMiddleANodeId,     
00265     kFBRightFootMiddleBNodeId,     
00266     kFBRightFootMiddleCNodeId,     
00267     kFBRightFootMiddleDNodeId,     
00268     kFBRightFootRingInNodeId,      
00269     kFBRightFootRingANodeId,       
00270     kFBRightFootRingBNodeId,       
00271     kFBRightFootRingCNodeId,       
00272     kFBRightFootRingDNodeId,       
00273     kFBRightFootPinkyInNodeId,     
00274     kFBRightFootPinkyANodeId,      
00275     kFBRightFootPinkyBNodeId,      
00276     kFBRightFootPinkyCNodeId,      
00277     kFBRightFootPinkyDNodeId,      
00278 
00279     kFBLeftExtraFootFingerInNodeId,        
00280     kFBLeftExtraFootFingerANodeId,         
00281     kFBLeftExtraFootFingerBNodeId,         
00282     kFBLeftExtraFootFingerCNodeId,         
00283     kFBLeftExtraFootFingerDNodeId,         
00284     kFBRightExtraFootFingerInNodeId,       
00285     kFBRightExtraFootFingerANodeId,        
00286     kFBRightExtraFootFingerBNodeId,        
00287     kFBRightExtraFootFingerCNodeId,        
00288     kFBRightExtraFootFingerDNodeId,        
00289 
00290     kFBLeftHandNodeId,             
00291     kFBRightHandNodeId,            
00292     kFBNeck1NodeId,                
00293     kFBNeck2NodeId,                
00294     kFBNeck3NodeId,                
00295     kFBNeck4NodeId,                
00296     kFBNeck5NodeId,                
00297     kFBNeck6NodeId,                
00298     kFBNeck7NodeId,                
00299     kFBNeck8NodeId,                
00300     kFBNeck9NodeId,                
00301 
00302     kFBHipsTranslationNodeId,       
00303     kFBLastNodeId                   
00304 };
00305 
00307 const int kFBLastActorNodeId = ( kFBHeadNodeId + 1 );
00308 
00310 enum FBEffectorId
00311 {
00312     kFBInvalidEffectorId = -1,         
00313     kFBHipsEffectorId = 0,             
00314     kFBLeftAnkleEffectorId,            
00315     kFBRightAnkleEffectorId,           
00316     kFBLeftWristEffectorId,            
00317     kFBRightWristEffectorId,           
00318     kFBLeftKneeEffectorId,             
00319     kFBRightKneeEffectorId,            
00320     kFBLeftElbowEffectorId,            
00321     kFBRightElbowEffectorId,           
00322     kFBChestOriginEffectorId,          
00323     kFBChestEndEffectorId,             
00324     kFBLeftFootEffectorId,             
00325     kFBRightFootEffectorId,            
00326     kFBLeftShoulderEffectorId,         
00327     kFBRightShoulderEffectorId,        
00328     kFBHeadEffectorId,                 
00329     kFBLeftHipEffectorId,              
00330     kFBRightHipEffectorId,             
00331     // -- New effector for 2.0 --
00332     kFBLeftHandEffectorId,             
00333     kFBRightHandEffectorId,            
00334     kFBLeftHandThumbEffectorId,        
00335     kFBLeftHandIndexEffectorId,        
00336     kFBLeftHandMiddleEffectorId,       
00337     kFBLeftHandRingEffectorId,         
00338     kFBLeftHandPinkyEffectorId,        
00339     kFBLeftHandExtraFingerEffectorId,  
00340     kFBRightHandThumbEffectorId,       
00341     kFBRightHandIndexEffectorId,       
00342     kFBRightHandMiddleEffectorId,      
00343     kFBRightHandRingEffectorId,        
00344     kFBRightHandPinkyEffectorId,       
00345     kFBRightHandExtraFingerEffectorId, 
00346     kFBLeftFootThumbEffectorId,        
00347     kFBLeftFootIndexEffectorId,        
00348     kFBLeftFootMiddleEffectorId,       
00349     kFBLeftFootRingEffectorId,         
00350     kFBLeftFootPinkyEffectorId,        
00351     kFBLeftFootExtraFingerEffectorId,  
00352     kFBRightFootThumbEffectorId,       
00353     kFBRightFootIndexEffectorId,       
00354     kFBRightFootMiddleEffectorId,      
00355     kFBRightFootRingEffectorId,        
00356     kFBRightFootPinkyEffectorId,       
00357     kFBRightFootExtraFingerEffectorId, 
00358     kFBLastEffectorId                  
00359 };
00360 
00362 enum FBEffectorSetID
00363 {   
00364     FBEffectorSetDefault = 0, 
00365     FBEffectorSetAux1, 
00366     FBEffectorSetAux2, 
00367     FBEffectorSetAux3, 
00368     FBEffectorSetAux4, 
00369     FBEffectorSetAux5, 
00370     FBEffectorSetAux6, 
00371     EFBffectorSetAux7, 
00372     FBEffectorSetAux8, 
00373     FBEffectorSetAux9, 
00374     FBEffectorSetAux10, 
00375     FBEffectorSetAux11, 
00376     FBEffectorSetAux12, 
00377     FBEffectorSetAux13, 
00378     FBEffectorSetAux14, 
00379     FBLastEffectorSetIndex 
00380 };
00381 
00383 enum FBFloorContactID
00384 {
00385     FBLeftHandMemberIndex,
00386     FBRightHandMemberIndex,
00387     FBLeftFootMemberIndex,
00388     FBRightFootMemberIndex, 
00389     FBLastCharacterMember
00390 };
00391 
00393 enum FBBodyPartId
00394 { 
00395     kFBCtrlSetPartNone = 0,     
00396     kFBCtrlSetPartHips,         
00397     kFBCtrlSetPartChest,        
00398     kFBCtrlSetPartLeftArm,      
00399     kFBCtrlSetPartRightArm,     
00400     kFBCtrlSetPartLeftLeg,      
00401     kFBCtrlSetPartRightLeg,     
00402     kFBCtrlSetPartHead,         
00403     kFBCtrlSetPartLeftHand,     
00404     kFBCtrlSetPartRightHand,    
00405     kFBCtrlSetPartLeftFoot,     
00406     kFBCtrlSetPartRightFoot,    
00407     kFBLastCtrlSetPartIndex     
00408 };
00409 
00410 
00411 
00413 enum FBCharacterInputType
00414 { 
00415     kFBCharacterInputActor, 
00416     kFBCharacterInputCharacter,
00417     kFBCharacterInputMarkerSet, 
00418     kFBCharacterOutputMarkerSet, 
00419     kFBCharacterInputStance,
00420     kFBCharacterInputMoCap
00421 };
00422 FB_DEFINE_ENUM( FBSDK_DLL, CharacterInputType );
00423 
00425 enum FBCharacterKeyingMode
00426 { 
00427     kFBCharacterKeyingFullBody, 
00428     kFBCharacterKeyingBodyPart,
00429     kFBCharacterKeyingSelection, 
00430 };
00431 FB_DEFINE_ENUM( FBSDK_DLL, CharacterKeyingMode );
00432 
00434 enum FBCharacterResetProperties
00435 {
00436     kFBCharacterResetPropertiesAll,
00437     kFBCharacterResetPropertiesSolving,
00438     kFBCharacterResetPropertiesDefinition
00439 };
00440 
00442 enum FBCharacterPlotWhere
00443 {
00444     kFBCharacterPlotOnControlRig,
00445     kFBCharacterPlotOnSkeleton
00446 };
00447 FB_DEFINE_ENUM( FBSDK_DLL, CharacterPlotWhere );
00448 
00450 enum FBCharacterHipsTranslationMode 
00451 { 
00452     kFBParamHipsTranslationWorldRigid = 0, 
00453     kFBParamHipsTranslationBodyRigid, 
00454     kFBLastHipsTranslationMode 
00455 };
00456 FB_DEFINE_ENUM( FBSDK_DLL, CharacterHipsTranslationMode );
00457 
00459 enum FBCharacterRollSolver 
00460 { 
00461     kFBParamRollSolver70 = 0, 
00462     kFBParamRollSolver75, 
00463     kFBLastRollSolver
00464 };
00465 FB_DEFINE_ENUM( FBSDK_DLL, CharacterRollSolver );
00466 
00468 enum FBCharacterContactBehaviour
00469 {
00470     kFBParamContactNeverSync = 0, 
00471     kFBParamContactSyncOnKey, 
00472     kFBParamContactAlwaysSync, 
00473     kFBLastContactBehaviour
00474 };
00475 FB_DEFINE_ENUM( FBSDK_DLL, CharacterContactBehaviour );
00476 
00478 enum FBControlSetType
00479 {
00480     kFBControlSetTypeNone = 0, 
00481     kFBControlSetTypeFKIK, 
00482     kFBControlSetTypeIKOnly
00483 };
00484 FB_DEFINE_ENUM( FBSDK_DLL, ControlSetType );
00485 
00490 FBSDK_DLL const char* FBCharacterBodyNodeNameFromId( FBBodyNodeId pBodyNodeId );
00491 
00496 FBSDK_DLL const char* FBCharacterEffectorNameFromId( FBEffectorId pEffectorId );
00497 
00499 // FBMarkerSet - Marker set for an actor
00501 __FB_FORWARD( FBMarkerSet );
00502 FB_DEFINE_COMPONENT( FBSDK_DLL, MarkerSet );
00503 FB_FORWARD( FBModel );
00504 
00506 typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
00507 
00512 class FBSDK_DLL FBMarkerSet : public FBComponent
00513 {
00514     //--- Open Reality declaration.
00515     __FBClassDeclare( FBMarkerSet, FBComponent );
00516 public:
00522     FBMarkerSet(const char* pName, HIObject pObject=NULL);
00523 
00527     FBModel* GetReferenceModel( );
00528 
00532     void SetReferenceModel( FBModel* pReferenceModel );
00533 
00539     FBModel* GetMarkerModel( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00540 
00546     void SetMarkerModel( FBSkeletonNodeId pNodeId, int pMarkerIndex, FBModel* pModel );
00547 
00552     bool SetMultipleMarkerModels( FBModelList* pModelList );
00553 
00559     const char* GetMarkerName( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00560 
00566     void SetMarkerName( FBSkeletonNodeId pNodeId, int pMarkerIndex, const char* pMarkerName );
00567 
00569 
00574     void GetMarkerTOffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, FBTVector* pTOffset );
00575     void SetMarkerTOffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, FBTVector* pTOffset );
00577 
00579 
00584     void GetMarkerROffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, FBRVector* pROffset );
00585     void SetMarkerROffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, FBRVector* pROffset );
00587 
00593     bool GetMarkerOriented( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00594 
00600     void SetMarkerOriented( FBSkeletonNodeId pNodeId, int pMarkerIndex, bool pIsOriented );
00601 
00607     bool GetMarkerUsed( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00608 
00614     void SetMarkerUsed( FBSkeletonNodeId pNodeId, int pMarkerIndex, bool pUsed );
00615     
00620     int GetMarkerCount( FBSkeletonNodeId pNodeId = kFBSkeletonInvalidIndex );
00621 
00626     int GetUsedMarkerCount( FBSkeletonNodeId pNodeId = kFBSkeletonInvalidIndex );
00627 
00634     int AddMarker( FBSkeletonNodeId pNodeId, FBModel* pModel = NULL, bool pIsOriented = false );
00635 
00639     void SetMarkerSetVisibility(bool pVisibility);
00640 
00644     int GetMarkerSetVisibility();
00645 
00649     bool GetLinkToModelOk();
00650 
00654     void BeginTransaction( );
00655 
00659     void EndTransaction( );
00660 
00661 };
00662 
00664 // FBControlSet - Control set for an actor
00666 __FB_FORWARD( FBControlSet );
00667 FB_DEFINE_COMPONENT( FBSDK_DLL, ControlSet );
00668 
00673 class FBSDK_DLL FBControlSet : public FBComponent
00674 {
00675     //--- Open Reality declaration.
00676     __FBClassDeclare( FBControlSet, FBComponent );
00677 public:
00683     FBControlSet(const char* pName, HIObject pObject=NULL);
00684 
00688     FBModel* GetReferenceModel( );
00689 
00693     const char* GetReferenceName( );
00694 
00699     int         GetIKEffectorIndex(FBModel* pModel);
00705     FBModel*    GetIKEffectorModel(FBEffectorId pEffectorIndex, int pPivotIndex = 0);
00709     int         GetIKEffectorPivotCount(FBEffectorId pEffectorIndex);
00714     const char* GetIKEffectorName(FBEffectorId pEffectorIndex);
00715 
00716 
00717 
00722     int         GetFKIndex(FBModel* pModel);
00727     FBModel*    GetFKModel(int pIndex);
00732     const char* GetFKName(int pIndex);
00733 
00737     int         GetFKCount();
00738 
00739 
00740 
00741     FBPropertyControlSetType ControlSetType; 
00742     FBPropertyBool  UseAxis; 
00743     FBPropertyDouble  FKOpacity; 
00744 };
00745 
00750 __FB_FORWARD( FBControlSetState );
00751 class FBSDK_DLL FBControlSetState
00752 {
00753 public:
00758     void GetNodeMatrix(FBBodyNodeId pNodeId, FBMatrix &pNodeGlobalMatrix);
00759 };
00760 
00765 __FB_FORWARD( FBEffectorSetState );
00766 class FBSDK_DLL FBEffectorSetState
00767 {
00768 public:
00773     void GetEffectorMatrix(FBEffectorId pEffectorId, FBMatrix &pEffectorGlobalMatrix);
00774 
00780     void GetReach(FBEffectorId pEffectorId, double &pReachT, double &pReachR);
00781 };
00782 
00784 // FBCharacterMarkerSet - Marker set for an character
00786 __FB_FORWARD( FBCharacterMarkerSet );
00787 FB_DEFINE_COMPONENT( FBSDK_DLL, CharacterMarkerSet );
00788 
00793 class FBSDK_DLL FBCharacterMarkerSet : public FBComponent
00794 {
00795     //--- Open Reality declaration.
00796     __FBClassDeclare( FBCharacterMarkerSet, FBComponent );
00797 public:
00803     FBCharacterMarkerSet(const char* pName, HIObject pObject=NULL);
00804 
00810     void        ReadCtrlSetAndEffectorState(FBControlSetState* pFKState, FBEffectorSetState* pIKState, FBEvaluateInfo* pEvaluateInfo);
00811 
00815     FBProperty* GetMarkersProperty(FBBodyNodeId pNodeId);
00816 
00820     FBProperty* GetExtractionProperty(FBBodyNodeId pNodeId);
00821 
00826     FBProperty* GetSnapProperty(FBBodyNodeId pNodeId, FBModelTransformationType pWhat);
00827 };
00828 
00833 __FB_FORWARD( FBSkeletonState );
00834 class FBSDK_DLL FBSkeletonState
00835 {
00836 public:
00841     void GetNodeMatrix(FBSkeletonNodeId pSkeletonId, FBMatrix &pSkeletonGlobalMatrix);
00842 };
00843 
00845 // FBActor - Representation of an actor
00847 __FB_FORWARD( FBActor );
00848 FB_DEFINE_COMPONENT( FBSDK_DLL, Actor );
00849 
00851 enum FBRecalcMarkerSetOffset
00852 {
00853     kFBRecalcMarkerSetOffsetTR,         
00854     kFBRecalcMarkerSetOffsetROnly       
00855 };
00856 
00897 class FBSDK_DLL FBActor : public FBConstraint
00898 {
00899     //--- Open Reality declaration.
00900     __FBClassDeclare( FBActor, FBConstraint );
00901 public:
00907     FBActor(const char* pName, HIObject pObject=NULL);
00908 
00912     virtual void FBDelete();
00913 
00914     FBPropertyMarkerSet     MarkerSet;      
00915     FBPropertyMarkerSet     OutputMarkerSet;
00916 
00917     FBPropertyColor         BodyColor;      
00918     FBPropertyColor         SkeletonColor;  
00919     FBPropertyColor         PivotColor;     
00920     FBPropertyDouble        MarkerSetSize;  
00921     FBPropertyDouble        PivotSize;      
00922 
00923     FBPropertyVector3d      HipsPosition;           
00924     FBPropertyVector3d      LeftHipPosition;        
00925     FBPropertyVector3d      LeftKneePosition;       
00926     FBPropertyVector3d      LeftAnklePosition;      
00927     FBPropertyVector3d      LeftFootPosition;       
00928     FBPropertyVector3d      RightHipPosition;       
00929     FBPropertyVector3d      RightKneePosition;      
00930     FBPropertyVector3d      RightAnklePosition;     
00931     FBPropertyVector3d      RightFootPosition;      
00932     FBPropertyVector3d      WaistPosition;          
00933     FBPropertyVector3d      ChestPosition;          
00934     FBPropertyVector3d      LeftCollarPosition;     
00935     FBPropertyVector3d      LeftShoulderPosition;   
00936     FBPropertyVector3d      LeftElbowPosition;      
00937     FBPropertyVector3d      LeftWristPosition;      
00938     FBPropertyVector3d      RightCollarPosition;    
00939     FBPropertyVector3d      RightShoulderPosition;  
00940     FBPropertyVector3d      RightElbowPosition;     
00941     FBPropertyVector3d      RightWristPosition;     
00942     FBPropertyVector3d      NeckPosition;           
00943     FBPropertyVector3d      HeadPosition;           
00944     FBPropertyBool          Visibility;             
00945 
00946     FBPropertyAnimatableDouble  LeftHandIndexIndex;     
00947     FBPropertyAnimatableDouble  LeftHandIndexMiddle;    
00948     FBPropertyAnimatableDouble  LeftHandIndexRing;      
00949     FBPropertyAnimatableDouble  LeftHandIndexPinky;     
00950 
00951     FBPropertyAnimatableDouble  LeftHandMiddleIndex;    
00952     FBPropertyAnimatableDouble  LeftHandMiddleMiddle;   
00953     FBPropertyAnimatableDouble  LeftHandMiddleRing;     
00954     FBPropertyAnimatableDouble  LeftHandMiddlePinky;    
00955 
00956     FBPropertyAnimatableDouble  LeftHandRingIndex;      
00957     FBPropertyAnimatableDouble  LeftHandRingMiddle;     
00958     FBPropertyAnimatableDouble  LeftHandRingRing;       
00959     FBPropertyAnimatableDouble  LeftHandRingPinky;      
00960 
00961     FBPropertyAnimatableDouble  LeftHandPinkyIndex;     
00962     FBPropertyAnimatableDouble  LeftHandPinkyMiddle;    
00963     FBPropertyAnimatableDouble  LeftHandPinkyRing;      
00964     FBPropertyAnimatableDouble  LeftHandPinkyPinky;     
00965 
00966     FBPropertyAnimatableDouble  RightHandIndexIndex;    
00967     FBPropertyAnimatableDouble  RightHandIndexMiddle;   
00968     FBPropertyAnimatableDouble  RightHandIndexRing;     
00969     FBPropertyAnimatableDouble  RightHandIndexPinky;    
00970 
00971     FBPropertyAnimatableDouble  RightHandMiddleIndex;   
00972     FBPropertyAnimatableDouble  RightHandMiddleMiddle;  
00973     FBPropertyAnimatableDouble  RightHandMiddleRing;    
00974     FBPropertyAnimatableDouble  RightHandMiddlePinky;   
00975 
00976     FBPropertyAnimatableDouble  RightHandRingIndex;     
00977     FBPropertyAnimatableDouble  RightHandRingMiddle;    
00978     FBPropertyAnimatableDouble  RightHandRingRing;      
00979     FBPropertyAnimatableDouble  RightHandRingPinky;     
00980 
00981     FBPropertyAnimatableDouble  RightHandPinkyIndex;    
00982     FBPropertyAnimatableDouble  RightHandPinkyMiddle;   
00983     FBPropertyAnimatableDouble  RightHandPinkyRing;     
00984     FBPropertyAnimatableDouble  RightHandPinkyPinky;    
00985 
00986     FBPropertyAnimatableDouble  FKFingerMultiplier;    
00987     FBPropertyAnimatableDouble  FKFingerTipMultiplier;    
00988     FBPropertyAnimatableDouble  FKThumbTipMultiplier;    
00989     FBPropertyAnimatableBool  HumanFingerLimits;    
00990     
00991 
00995     virtual bool Snap( FBRecalcMarkerSetOffset pRecalcOffset );
00996 
00997 
01001     void    UpdateValues( FBEvaluateInfo* pEvalInfo );
01002 
01008     void    SetDefinitionScaleVector(   FBSkeletonNodeId pSkeletonId, FBVector3d pScaleVector, bool pSymmetricUpdate = true );
01009 
01014     void    GetDefinitionScaleVector(   FBSkeletonNodeId pSkeletonId, FBVector3d &pScaleVector );
01015 
01021     void    SetDefinitionRotationVector(    FBSkeletonNodeId pSkeletonId, FBVector3d pRotationVector, bool pSymmetricUpdate = true );
01022     
01026     void    SetActorTranslation( FBVector3d pTranslationVector );    
01027 
01031     FBSkeletonState*    GetDefaultSkeletonState ();
01032 
01038     FBSkeletonState*    GetCurrentSkeletonState (bool pResetOrientation=false);
01039 
01043     FBModel* GetLeftGloveReferenceModel( );
01044 
01048     void SetLeftGloveReferenceModel( FBModel* pReferenceModel );
01049 
01053     FBModel* GetRightGloveReferenceModel( );
01054 
01058     void SetRightGloveReferenceModel( FBModel* pReferenceModel );
01059 };
01060 
01061 
01063 // FBCharacter - Representation of a character
01065 FB_FORWARD( FBPlotOptions );
01066 __FB_FORWARD( FBCharacter );
01067 FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
01068 
01108 class FBSDK_DLL FBCharacter : public FBConstraint
01109 {
01110     //--- Open Reality declaration.
01111     __FBClassDeclare( FBCharacter, FBConstraint );
01112 public:
01118     FBCharacter(const char* pName, HIObject pObject=NULL);
01119 
01120     IObject_Declare(K_IMPLEMENTATION);              // Interface to IObject.
01121 
01125     virtual void FBDelete();
01126 
01128     FBCharacter* Clone();
01129 
01130     FBPropertyCharacterInputType    InputType;      
01131     FBPropertyCharacterKeyingMode   KeyingMode;     
01132     FBPropertyActor                 InputActor;     
01133     FBPropertyCharacter             InputCharacter; 
01134     FBPropertyBool                  ActiveInput;    
01135 
01136     FBPropertyListCharacterExtension CharacterExtensions;   
01137 
01141     void AddCharacterExtension(FBCharacterExtension* pExt);  
01142 
01146     void RemoveCharacterExtension(FBCharacterExtension* pExt);
01147 
01151     FBModel* GetModel( FBBodyNodeId pBodyNodeId );
01152 
01157     void GetSkinModelList( FBModelList& pSkinModelList );
01158 
01162     FBBodyNodeId GetIndexByModel( FBModel* pModel );
01163 
01167     FBModel* GetCtrlRigModel( FBBodyNodeId pBodyNodeId );
01168 
01172     FBBodyNodeId GetCtrlRigIndexByModel( FBModel* pModel );
01173 
01179     FBModel* GetEffectorModel( FBEffectorId pEffectorId, FBEffectorSetID  pEffectorSetID = FBEffectorSetDefault );
01180 
01185     FBModel* GetFloorContactModel( FBFloorContactID pMemberIndex );
01186 
01190     FBModel* GetGoalModel( FBBodyNodeId pBodyNodeId );
01191 
01192     /* Get The Translation Offset associated to the given BodyPart
01193     *   \param pTVector  The Translation Offset
01194     */
01195     void GetTOffset( FBBodyNodeId pBodyNodeId, FBTVector* pTVector );
01196 
01197     /* Get The Rotation Offset associated to the given BodyPart
01198     *   \param pRVector  The Rotation Offset
01199     */
01200     void GetROffset( FBBodyNodeId pBodyNodeId, FBRVector* pRVector );
01201 
01202     /* Get The Scaling Offset associated to the given BodyPart
01203     *   \param pTVector  The Scaling Offset
01204     */
01205     void GetSOffset( FBBodyNodeId pBodyNodeId, FBSVector* pSVector );
01206 
01207     /* Get The Transform Offset associated to the given BodyPart
01208     *   \param pOffsetMatrix  The Translation, Rotation and Scaling Offset
01209     */
01210     void GetTransformOffset( FBBodyNodeId pBodyNodeId, FBMatrix *pOffsetMatrix );
01211 
01212     /* Get The Parent Rotation Offset associated to the given BodyPart
01213     *   \param pRVector  The Rotation Offset
01214     */
01215     void GetParentROffset( FBBodyNodeId pBodyNodeId, FBRVector* pRVector );
01216 
01222     virtual bool PlotAnimation( FBCharacterPlotWhere pPlotWhere, FBPlotOptions* pPlotOptions );
01223 
01227     bool ReadyForRetarget();
01228 
01232     void Retarget( bool pOnBaseLayer );
01233 
01236     void CopyAnimation();
01237 
01241     virtual void ResetProperties( FBCharacterResetProperties pType );
01242 
01249     void SelectModels( bool pSelect, bool pApplyToCharacter, bool pApplyToRig, bool pApplyToExtensions );
01250 
01255     void GoToStancePose( bool pPushUndo = false, bool pIncludeCharacterExtensions = true );
01256 
01261     bool SetCharacterizeOn( bool pSetAsBiped );
01262     
01266     const char * GetCharacterizeError();
01267 
01270     void SetCharacterizeOff();
01271     
01275     bool GetCharacterize();
01276     
01281     bool CreateControlRig(bool pSetFKIK);
01282 
01288     void ConnectControlRig(FBControlSet* pControlSet, bool pUpdateLimit, bool pResetHierarchy);
01289 
01292     void DisconnectControlRig();
01293 
01301     bool CreateAuxiliary(FBEffectorId pEffectorId, bool pPivot, double pAuxReachT=100, double pAuxReachR=100);
01302 
01307     FBControlSet * GetCurrentControlSet(bool pForce = false);
01308 
01313     bool CreateCharacterMarkerSet(bool pSetActive);
01314 
01319     FBCharacterMarkerSet * GetCharacterMarkerSet(bool pForce = false);
01320 
01325     bool IsParentNodeOffset( FBBodyNodeId pNodeId );
01326 
01330     FBCharacterSolver *GetExternalSolver();
01331 
01335     void SetExternalSolver(int pIndex);
01336 
01340     void SetExternalSolver(FBCharacterSolver* pSolver);
01341 
01345     void GetActiveBodyPart(bool* pActivePart);
01346 
01351     bool        IsRotationPin(FBEffectorId pEffectorIndex);
01356     bool        IsTranslationPin(FBEffectorId pEffectorIndex);
01357 
01361     bool        IsCtrlSetReady();
01362 
01366     bool        IsPlottingActorToCtrlRig();
01367 
01371     FBControlSetState*  GetControlSetEvaluationCache(FBEvaluateInfo* pEvaluateInfo);
01372     
01376     FBEffectorSetState* GetEffectorEvaluationCache(FBEvaluateInfo* pEvaluateInfo);
01377 
01379     FBString mCharacterizeError;
01380 
01382     // ParamModifier
01383     FBPropertyBool                          MirrorMode;                 
01384     FBPropertyAnimatableDouble              ShoulderCorrection;         
01385     FBPropertyBool                          LeftKneeKillPitch;          
01386     FBPropertyBool                          RightKneeKillPitch;         
01387     FBPropertyBool                          LeftElbowKillPitch;         
01388     FBPropertyBool                          RightElbowKillPitch;        
01389     FBPropertyCharacterHipsTranslationMode  HipsTranslationMode;        
01390     FBPropertyBool                          WriteReference;             
01391     FBPropertyBool                          SyncMode;                   
01392     FBPropertyBool                          InverseLeftKnee;            
01393     FBPropertyBool                          InverseRightKnee;           
01394     FBPropertyBool                          InverseLeftElbow;           
01395     FBPropertyBool                          InverseRightElbow;          
01396     FBPropertyCharacterRollSolver           RollSolver;                 
01397     FBPropertyCharacterContactBehaviour     ContactBehaviour;           
01398 
01399     FBPropertyAnimatableDouble              ScaleCompensation;
01400     FBPropertyAnimatableDouble              HipsHeightCompensation;
01401     FBPropertyAnimatableDouble              AnkleHeightCompensation;
01402     FBPropertyAnimatableDouble              AnkleProximityCompensation;
01403 
01404     FBPropertyBool                          LockX;          
01405     FBPropertyBool                          LockY;          
01406     FBPropertyBool                          LockZ;          
01407 };
01408 
01409 
01411 // Property List: MarkerSet
01413 
01417 class FBSDK_DLL FBPropertyListMarkerSet : public FBPropertyListComponent
01418 {
01419 public:
01420     FBPropertyListMarkerSet();
01425     FBMarkerSet* operator[](int pIndex);
01430     virtual int Duplicate(int pIndex);
01431 };
01432 
01434 // Property List: CharacterMarkerSet
01436 
01440 class FBSDK_DLL FBPropertyListCharacterMarkerSet : public FBPropertyListComponent
01441 {
01442 public:
01443     FBPropertyListCharacterMarkerSet();
01448     FBCharacterMarkerSet* operator[](int pIndex);
01449 };
01450 
01452 // Property List: ControlSet
01454 
01458 class FBSDK_DLL FBPropertyListControlSet : public FBPropertyListComponent
01459 {
01460 public:
01461     FBPropertyListControlSet();
01466     FBControlSet* operator[](int pIndex);
01467 };
01468 
01470 // Property List: Actor
01472 
01476 class FBSDK_DLL FBPropertyListActor : public FBPropertyListComponent
01477 {
01478   public:
01479     FBPropertyListActor();
01484     FBActor* operator[]( int pIndex );
01489     virtual int Duplicate( int pIndex );
01490 };
01491 
01492 
01494 // Property List: Character
01496 FB_FORWARD      ( FBPropertyListCharacter );
01497 
01502 class FBSDK_DLL FBPropertyListCharacter : public FBPropertyListComponent
01503 {
01504   public:
01505     FBPropertyListCharacter();
01510     FBCharacter* operator[]( int pIndex );
01515     virtual int Duplicate( int pIndex );
01516 };
01517 
01518 //Helpers
01519 
01523 FBSDK_DLL FBCharacterKeyingMode FBGetCharactersKeyingMode();
01524 
01529 FBSDK_DLL FBBodyPartId FBGetEffectorBodyPart( FBEffectorId pEffectorId );
01530 
01535 FBSDK_DLL FBBodyPartId FBGetBodyNodeBodyPart( FBBodyNodeId pBodyNodeId );
01536 
01541 FBSDK_DLL FBCharacter* FBGetCharacterByAssociatedPart(FBComponent* pPart);
01542 
01546 FBSDK_DLL bool FBGetCharacterFloorContactsVisibility();
01547 
01551 FBSDK_DLL void FBSetCharacterFloorContactsVisibility(bool pShow);
01552 
01556 FBSDK_DLL bool FBGetCharacterFingerTipsVisibility();
01557 
01561 FBSDK_DLL void FBSetCharacterFingerTipsVisibility(bool pShow);
01562 
01563 #ifdef FBSDKUseNamespace
01564     }
01565 #endif
01566 #endif /* _FB_CHARACTER_H_ */