fbcharacter.h

Go to the documentation of this file.
00001 #ifndef __FBCHARACTER_H__
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 };
00421 FB_DEFINE_ENUM( FBSDK_DLL, CharacterInputType );
00422 
00424 enum FBCharacterKeyingMode
00425 { 
00426     kFBCharacterKeyingFullBody, 
00427     kFBCharacterKeyingBodyPart,
00428     kFBCharacterKeyingSelection, 
00429 };
00430 FB_DEFINE_ENUM( FBSDK_DLL, CharacterKeyingMode );
00431 
00433 enum FBCharacterResetProperties
00434 {
00435     kFBCharacterResetPropertiesAll,
00436     kFBCharacterResetPropertiesSolving,
00437     kFBCharacterResetPropertiesDefinition
00438 };
00439 
00441 enum FBCharacterPlotWhere
00442 {
00443     kFBCharacterPlotOnControlRig,
00444     kFBCharacterPlotOnSkeleton
00445 };
00446 FB_DEFINE_ENUM( FBSDK_DLL, CharacterPlotWhere );
00447 
00449 enum FBCharacterHipsTranslationMode 
00450 { 
00451     kFBParamHipsTranslationWorldRigid = 0, 
00452     kFBParamHipsTranslationBodyRigid, 
00453     kFBLastHipsTranslationMode 
00454 };
00455 FB_DEFINE_ENUM( FBSDK_DLL, CharacterHipsTranslationMode );
00456 
00458 enum FBCharacterRollSolver 
00459 { 
00460     kFBParamRollSolver70 = 0, 
00461     kFBParamRollSolver75, 
00462     kFBLastRollSolver
00463 };
00464 FB_DEFINE_ENUM( FBSDK_DLL, CharacterRollSolver );
00465 
00467 enum FBCharacterContactBehaviour
00468 {
00469     kFBParamContactNeverSync = 0, 
00470     kFBParamContactSyncOnKey, 
00471     kFBParamContactAlwaysSync, 
00472     kFBLastContactBehaviour
00473 };
00474 FB_DEFINE_ENUM( FBSDK_DLL, CharacterContactBehaviour );
00475 
00477 enum FBControlSetType
00478 {
00479     kFBControlSetTypeNone = 0, 
00480     kFBControlSetTypeFKIK, 
00481     kFBControlSetTypeIKOnly
00482 };
00483 FB_DEFINE_ENUM( FBSDK_DLL, ControlSetType );
00484 
00489 FBSDK_DLL const char* FBCharacterBodyNodeNameFromId( FBBodyNodeId pBodyNodeId );
00490 
00495 FBSDK_DLL const char* FBCharacterEffectorNameFromId( FBEffectorId pEffectorId );
00496 
00498 // FBMarkerSet - Marker set for an actor
00500 __FB_FORWARD( FBMarkerSet );
00501 FB_DEFINE_COMPONENT( FBSDK_DLL, MarkerSet );
00502 FB_FORWARD( FBModel );
00503 
00505 typedef class FBSDK_DLL FBArrayTemplate<HFBModel> FBModelList;
00506 
00511 class FBSDK_DLL FBMarkerSet : public FBComponent
00512 {
00513     //--- Open Reality declaration.
00514     __FBClassDeclare( FBMarkerSet, FBComponent );
00515 public:
00521     FBMarkerSet(char* pName, HIObject pObject = NULL);
00522 
00523     IObject_Declare(Implementation);        // Interface to IObject.
00524 
00528     HFBModel GetReferenceModel( );
00529 
00533     void SetReferenceModel( HFBModel pReferenceModel );
00534 
00540     HFBModel GetMarkerModel( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00541 
00547     void SetMarkerModel( FBSkeletonNodeId pNodeId, int pMarkerIndex, HFBModel pModel );
00548 
00553     bool SetMultipleMarkerModels( FBModelList* pModelList );
00554 
00560     char* GetMarkerName( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00561 
00567     void SetMarkerName( FBSkeletonNodeId pNodeId, int pMarkerIndex, char* pMarkerName );
00568 
00570 
00575     void GetMarkerTOffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, HFBTVector pTOffset );
00576     void SetMarkerTOffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, HFBTVector pTOffset );
00578 
00580 
00585     void GetMarkerROffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, HFBRVector pROffset );
00586     void SetMarkerROffset( FBSkeletonNodeId pNodeId, int pMarkerIndex, HFBRVector pROffset );
00588 
00594     bool GetMarkerOriented( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00595 
00601     void SetMarkerOriented( FBSkeletonNodeId pNodeId, int pMarkerIndex, bool pIsOriented );
00602 
00608     bool GetMarkerUsed( FBSkeletonNodeId pNodeId, int pMarkerIndex );
00609 
00615     void SetMarkerUsed( FBSkeletonNodeId pNodeId, int pMarkerIndex, bool pUsed );
00616     
00621     int GetMarkerCount( FBSkeletonNodeId pNodeId = kFBSkeletonInvalidIndex );
00622 
00627     int GetUsedMarkerCount( FBSkeletonNodeId pNodeId = kFBSkeletonInvalidIndex );
00628 
00635     int AddMarker( FBSkeletonNodeId pNodeId, HFBModel pModel = NULL, bool pIsOriented = false );
00636 
00640     void SetMarkerSetVisibility(bool pVisibility);
00641 
00645     int GetMarkerSetVisibility();
00646 
00650     bool GetLinkToModelOk();
00651 
00655     void BeginTransaction( );
00656 
00660     void EndTransaction( );
00661 
00662 };
00663 
00665 // FBControlSet - Control set for an actor
00667 __FB_FORWARD( FBControlSet );
00668 FB_DEFINE_COMPONENT( FBSDK_DLL, ControlSet );
00669 
00674 class FBSDK_DLL FBControlSet : public FBComponent
00675 {
00676     //--- Open Reality declaration.
00677     __FBClassDeclare( FBControlSet, FBComponent );
00678 public:
00684     FBControlSet(char* pName, HIObject pObject = NULL);
00685 
00689     HFBModel GetReferenceModel( );
00690 
00694     char* GetReferenceName( );
00695 
00700     int         GetIKEffectorIndex(HFBModel pModel);
00706     HFBModel    GetIKEffectorModel(FBEffectorId pEffectorIndex, int pPivotIndex = 0);
00710     int         GetIKEffectorPivotCount(FBEffectorId pEffectorIndex);
00715     char*       GetIKEffectorName(FBEffectorId pEffectorIndex);
00716 
00717 
00718 
00723     int         GetFKIndex(HFBModel pModel);
00728     HFBModel    GetFKModel(int pIndex);
00733     char*       GetFKName(int pIndex);
00734 
00738     int         GetFKCount();
00739 
00740 
00741 
00742     FBPropertyControlSetType ControlSetType; 
00743     FBPropertyBool  UseAxis; 
00744     FBPropertyDouble  FKOpacity; 
00745 };
00746 
00751 __FB_FORWARD( FBSkeletonState );
00752 class FBSDK_DLL FBSkeletonState
00753 {
00754 public:
00759     void GetNodeMatrix(FBSkeletonNodeId pSkeletonId, FBMatrix &pSkeletonGlobalMatrix);
00760 };
00761 
00763 // FBActor - Representation of an actor
00765 __FB_FORWARD( FBActor );
00766 FB_DEFINE_COMPONENT( FBSDK_DLL, Actor );
00767 
00769 enum FBRecalcMarkerSetOffset
00770 {
00771     kFBRecalcMarkerSetOffsetTR,         
00772     kFBRecalcMarkerSetOffsetROnly       
00773 };
00774 
00809 class FBSDK_DLL FBActor : public FBConstraint
00810 {
00811     //--- Open Reality declaration.
00812     __FBClassDeclare( FBActor, FBConstraint );
00813 public:
00819     FBActor(char* pName, HIObject pObject = NULL);
00820 
00821     IObject_Declare(Implementation);        // Interface to IObject.
00822 
00826     virtual void FBDelete();
00827 
00828     FBPropertyMarkerSet     MarkerSet;      
00829     FBPropertyMarkerSet     OutputMarkerSet;
00830     FBPropertyBool          Active;         
00831     FBPropertyBool          Locked;         
00832 
00833     FBPropertyColor         BodyColor;      
00834     FBPropertyColor         SkeletonColor;  
00835     FBPropertyColor         PivotColor;     
00836     FBPropertyDouble        MarkerSetSize;  
00837     FBPropertyDouble        PivotSize;      
00838 
00839     FBPropertyVector3d      HipsPosition;           
00840     FBPropertyVector3d      LeftHipPosition;        
00841     FBPropertyVector3d      LeftKneePosition;       
00842     FBPropertyVector3d      LeftAnklePosition;      
00843     FBPropertyVector3d      LeftFootPosition;       
00844     FBPropertyVector3d      RightHipPosition;       
00845     FBPropertyVector3d      RightKneePosition;      
00846     FBPropertyVector3d      RightAnklePosition;     
00847     FBPropertyVector3d      RightFootPosition;      
00848     FBPropertyVector3d      WaistPosition;          
00849     FBPropertyVector3d      ChestPosition;          
00850     FBPropertyVector3d      LeftCollarPosition;     
00851     FBPropertyVector3d      LeftShoulderPosition;   
00852     FBPropertyVector3d      LeftElbowPosition;      
00853     FBPropertyVector3d      LeftWristPosition;      
00854     FBPropertyVector3d      RightCollarPosition;    
00855     FBPropertyVector3d      RightShoulderPosition;  
00856     FBPropertyVector3d      RightElbowPosition;     
00857     FBPropertyVector3d      RightWristPosition;     
00858     FBPropertyVector3d      NeckPosition;           
00859     FBPropertyVector3d      HeadPosition;           
00860 
00861     FBPropertyAnimatableDouble  LeftHandIndexIndex;     
00862     FBPropertyAnimatableDouble  LeftHandIndexMiddle;    
00863     FBPropertyAnimatableDouble  LeftHandIndexRing;      
00864     FBPropertyAnimatableDouble  LeftHandIndexPinky;     
00865 
00866     FBPropertyAnimatableDouble  LeftHandMiddleIndex;    
00867     FBPropertyAnimatableDouble  LeftHandMiddleMiddle;   
00868     FBPropertyAnimatableDouble  LeftHandMiddleRing;     
00869     FBPropertyAnimatableDouble  LeftHandMiddlePinky;    
00870 
00871     FBPropertyAnimatableDouble  LeftHandRingIndex;      
00872     FBPropertyAnimatableDouble  LeftHandRingMiddle;     
00873     FBPropertyAnimatableDouble  LeftHandRingRing;       
00874     FBPropertyAnimatableDouble  LeftHandRingPinky;      
00875 
00876     FBPropertyAnimatableDouble  LeftHandPinkyIndex;     
00877     FBPropertyAnimatableDouble  LeftHandPinkyMiddle;    
00878     FBPropertyAnimatableDouble  LeftHandPinkyRing;      
00879     FBPropertyAnimatableDouble  LeftHandPinkyPinky;     
00880 
00881     FBPropertyAnimatableDouble  RightHandIndexIndex;    
00882     FBPropertyAnimatableDouble  RightHandIndexMiddle;   
00883     FBPropertyAnimatableDouble  RightHandIndexRing;     
00884     FBPropertyAnimatableDouble  RightHandIndexPinky;    
00885 
00886     FBPropertyAnimatableDouble  RightHandMiddleIndex;   
00887     FBPropertyAnimatableDouble  RightHandMiddleMiddle;  
00888     FBPropertyAnimatableDouble  RightHandMiddleRing;    
00889     FBPropertyAnimatableDouble  RightHandMiddlePinky;   
00890 
00891     FBPropertyAnimatableDouble  RightHandRingIndex;     
00892     FBPropertyAnimatableDouble  RightHandRingMiddle;    
00893     FBPropertyAnimatableDouble  RightHandRingRing;      
00894     FBPropertyAnimatableDouble  RightHandRingPinky;     
00895 
00896     FBPropertyAnimatableDouble  RightHandPinkyIndex;    
00897     FBPropertyAnimatableDouble  RightHandPinkyMiddle;   
00898     FBPropertyAnimatableDouble  RightHandPinkyRing;     
00899     FBPropertyAnimatableDouble  RightHandPinkyPinky;    
00900 
00901     FBPropertyAnimatableDouble  FKFingerMultiplier;    
00902     FBPropertyAnimatableDouble  FKFingerTipMultiplier;    
00903     FBPropertyAnimatableDouble  FKThumbTipMultiplier;    
00904     FBPropertyAnimatableBool  HumanFingerLimits;    
00905     
00906 
00910     virtual bool Snap( FBRecalcMarkerSetOffset pRecalcOffset );
00911 
00912 
00916     void    UpdateValues( HFBEvaluateInfo pEvalInfo );
00917 
00923     void    SetDefinitionScaleVector(   FBSkeletonNodeId pSkeletonId, FBVector3d pScaleVector, bool pSymmetricUpdate = true );
00924 
00929     void    GetDefinitionScaleVector(   FBSkeletonNodeId pSkeletonId, FBVector3d &pScaleVector );
00930 
00936     void    SetDefinitionRotationVector(    FBSkeletonNodeId pSkeletonId, FBVector3d pRotationVector, bool pSymmetricUpdate = true );
00937     
00941     void    SetActorTranslation( FBVector3d pTranslationVector );    
00942 
00946     HFBSkeletonState    GetDefaultSkeletonState ();
00947 
00951     HFBSkeletonState    GetCurrentSkeletonState ();
00952 
00956     HFBModel GetLeftGloveReferenceModel( );
00957 
00961     void SetLeftGloveReferenceModel( HFBModel pReferenceModel );
00962 
00966     HFBModel GetRightGloveReferenceModel( );
00967 
00971     void SetRightGloveReferenceModel( HFBModel pReferenceModel );
00972 };
00973 
00974 
00976 // FBCharacter - Representation of a character
00978 FB_FORWARD( FBPlotOptions );
00979 __FB_FORWARD( FBCharacter );
00980 FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
00981 
01021 class FBSDK_DLL FBCharacter : public FBConstraint
01022 {
01023     //--- Open Reality declaration.
01024     __FBClassDeclare( FBCharacter, FBConstraint );
01025 public:
01031     FBCharacter(char* pName, HIObject pObject = NULL);
01032 
01033     IObject_Declare(Implementation);                // Interface to IObject.
01034 
01038     virtual void FBDelete();
01039 
01041     FBCharacter* Clone();
01042 
01043     FBPropertyCharacterInputType    InputType;      
01044     FBPropertyCharacterKeyingMode   KeyingMode;     
01045     FBPropertyActor                 InputActor;     
01046     FBPropertyCharacter             InputCharacter; 
01047     FBPropertyBool                  ActiveInput;    
01048 
01049     FBPropertyListCharacterExtension CharacterExtensions;   
01050 
01054     void AddCharacterExtension(HFBCharacterExtension pExt);  
01055 
01059     void RemoveCharacterExtension(HFBCharacterExtension pExt);
01060 
01064     HFBModel GetModel( FBBodyNodeId pBodyNodeId );
01065 
01069     FBBodyNodeId GetIndexByModel( HFBModel pModel );
01070 
01074     HFBModel GetCtrlRigModel( FBBodyNodeId pBodyNodeId );
01075 
01079     FBBodyNodeId GetCtrlRigIndexByModel( HFBModel pModel );
01080 
01086     HFBModel GetEffectorModel( FBEffectorId pEffectorId, FBEffectorSetID  pEffectorSetID = FBEffectorSetDefault );
01087 
01092     HFBModel GetFloorContactModel( FBFloorContactID pMemberIndex );
01093 
01094     /* Get The Translation Offset associated to the given BodyPart
01095     *   \param pTVector  The Translation Offset
01096     */
01097     void GetTOffset( FBBodyNodeId pBodyNodeId, HFBTVector pTVector );
01098 
01099     /* Get The Rotation Offset associated to the given BodyPart
01100     *   \param pRVector  The Rotation Offset
01101     */
01102     void GetROffset( FBBodyNodeId pBodyNodeId, HFBRVector pRVector );
01103 
01104     /* Get The Scaling Offset associated to the given BodyPart
01105     *   \param pTVector  The Scaling Offset
01106     */
01107     void GetSOffset( FBBodyNodeId pBodyNodeId, HFBSVector pSVector );
01108 
01109     /* Get The Transform Offset associated to the given BodyPart
01110     *   \param pOffsetMatrix  The Translation, Rotation and Scaling Offset
01111     */
01112     void GetTransformOffset( FBBodyNodeId pBodyNodeId, FBMatrix *pOffsetMatrix );
01113 
01114     /* Get The Parent Rotation Offset associated to the given BodyPart
01115     *   \param pRVector  The Rotation Offset
01116     */
01117     void GetParentROffset( FBBodyNodeId pBodyNodeId, HFBRVector pRVector );
01118 
01122     virtual bool PlotAnimation( FBCharacterPlotWhere pPlotWhere, FBPlotOptions* pPlotOptions );
01123 
01127     bool ReadyForRetarget();
01128 
01132     void Retarget( bool pOnBaseLayer );
01133 
01136     void CopyAnimation();
01137 
01141     virtual void ResetProperties( FBCharacterResetProperties pType );
01142 
01149     void SelectModels( bool pSelect, bool pApplyToCharacter, bool pApplyToRig, bool pApplyToExtensions );
01150 
01155     void GoToStancePose( bool pPushUndo = false, bool pIncludeCharacterExtensions = true );
01156 
01161     bool SetCharacterizeOn( bool pSetAsBiped );
01162     
01166     const char * GetCharacterizeError();
01167 
01170     void SetCharacterizeOff();
01171     
01175     bool GetCharacterize();
01180     bool CreateControlRig(bool pSetFKIK);
01181 
01182 
01187     FBControlSet * GetCurrentControlSet(bool pForce = false);
01188 
01193     bool IsParentNodeOffset( FBBodyNodeId pNodeId );
01194 
01198     FBCharacterSolver *GetExternalSolver();
01199 
01203     void SetExternalSolver(int pIndex);
01204 
01208     void SetExternalSolver(FBCharacterSolver* pSolver);
01209 
01213     void GetActiveBodyPart(bool* pActivePart);
01214 
01219     bool        IsRotationPin(FBEffectorId pEffectorIndex);
01224     bool        IsTranslationPin(FBEffectorId pEffectorIndex);
01225 
01229     bool        IsCtrlSetReady();
01230 
01234     bool        IsPlottingActorToCtrlRig();
01235 
01237     FBString mCharacterizeError;
01238 
01240     // ParamModifier
01241     FBPropertyBool                          MirrorMode;                 
01242     FBPropertyAnimatableDouble              ShoulderCorrection;         
01243     FBPropertyBool                          LeftKneeKillPitch;          
01244     FBPropertyBool                          RightKneeKillPitch;         
01245     FBPropertyBool                          LeftElbowKillPitch;         
01246     FBPropertyBool                          RightElbowKillPitch;        
01247     FBPropertyCharacterHipsTranslationMode  HipsTranslationMode;        
01248     FBPropertyBool                          WriteReference;             
01249     FBPropertyBool                          SyncMode;                   
01250     FBPropertyBool                          InverseLeftKnee;            
01251     FBPropertyBool                          InverseRightKnee;           
01252     FBPropertyBool                          InverseLeftElbow;           
01253     FBPropertyBool                          InverseRightElbow;          
01254     FBPropertyCharacterRollSolver           RollSolver;                 
01255     FBPropertyCharacterContactBehaviour     ContactBehaviour;           
01256 
01257     FBPropertyAnimatableDouble              ScaleCompensation;
01258     FBPropertyAnimatableDouble              HipsHeightCompensation;
01259     FBPropertyAnimatableDouble              AnkleHeightCompensation;
01260     FBPropertyAnimatableDouble              AnkleProximityCompensation;
01261 };
01262 
01263 
01265 // Property List: MarkerSet
01267 
01271 class FBSDK_DLL FBPropertyListMarkerSet : public FBPropertyListComponent
01272 {
01273 public:
01274     FBPropertyListMarkerSet();
01279     FBMarkerSet* operator[](int pIndex);
01284     virtual int Duplicate(int pIndex);
01285 };
01286 
01288 // Property List: ControlSet
01290 
01294 class FBSDK_DLL FBPropertyListControlSet : public FBPropertyListComponent
01295 {
01296 public:
01297     FBPropertyListControlSet();
01302     FBControlSet* operator[](int pIndex);
01303 };
01304 
01306 // Property List: Actor
01308 
01312 class FBSDK_DLL FBPropertyListActor : public FBPropertyListComponent
01313 {
01314   public:
01315     FBPropertyListActor();
01320     FBActor* operator[]( int pIndex );
01325     virtual int Duplicate( int pIndex );
01326 };
01327 
01328 
01330 // Property List: Character
01332 FB_FORWARD      ( FBPropertyListCharacter );
01333 
01338 class FBSDK_DLL FBPropertyListCharacter : public FBPropertyListComponent
01339 {
01340   public:
01341     FBPropertyListCharacter();
01346     HFBCharacter operator[]( int pIndex );
01351     virtual int Duplicate( int pIndex );
01352 };
01353 
01354 //Helpers
01355 
01359 FBSDK_DLL FBCharacterKeyingMode FBGetCharactersKeyingMode();
01360 
01365 FBSDK_DLL FBBodyPartId FBGetEffectorBodyPart( FBEffectorId pEffectorId );
01366 
01371 FBSDK_DLL FBBodyPartId FBGetBodyNodeBodyPart( FBBodyNodeId pBodyNodeId );
01372 
01377 FBSDK_DLL HFBCharacter FBGetCharacterByAssociatedPart(HFBComponent pPart);
01378 
01379 #ifdef FBSDKUseNamespace
01380     }
01381 #endif
01382 #endif /* _FB_CHARACTER_H_ */

Please send us your comments about this page.