fbsystem.h

Go to the documentation of this file.
00001 #ifndef __FBSYSTEM_H__
00002 #define __FBSYSTEM_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 
00045 #include <kaydaradef.h>
00046 #ifndef FBSDK_DLL 
00047 
00050     #define FBSDK_DLL K_DLLIMPORT
00051 #endif
00052 
00053 // Essential includes
00054 #include <fbsdk/fbcomponent.h>
00055 #include <fbsdk/fbdata.h>   // FBPropertyListTake
00056 
00057 #include <fbsdk/fbio.h>     // FBPropertyListCommPort
00058 #include <fbsdk/fbshader.h>
00059 #include <fbsdk/fbmodel.h>
00060 #include <fbsdk/fbevaluateinfo.h>
00061 
00062 // For 'lean version' we don't need the plugin headers.
00063 #if !defined(K_NO_AUDIO)
00064     #include <fbsdk/fbaudio.h>
00065 #endif
00066 
00067 #if !defined(K_NO_VIDEO)
00068     #include <fbsdk/fbvideo.h>
00069 #endif
00070 
00071 #if !defined(K_NO_DECK)
00072     #include <fbsdk/fbdeck.h>           // FBPropertyListDeck
00073 #endif
00074 
00075 #if !defined(K_NO_ASSETMNG)
00076     #include <fbsdk/fbassetmng.h>   // FBPropertyAssetMng
00077 #endif
00078 
00079 #if !defined(K_NO_MANIPULATOR)
00080     #include <fbsdk/fbmanipulator.h>    // FBPropertyListManipulator
00081 #endif
00082 
00083 #ifdef FBSDKUseNamespace
00084     namespace FBSDKNamespace {
00085 #endif
00086 
00087 #if !defined(K_NO_CHARACTER)
00088 FB_FORWARD( FBCharacter );
00089 #endif
00090 
00091 struct FBVideoGrabOptions;
00093 typedef FBVideoGrabOptions* HFBVideoGrabOptions;
00094 
00095 struct FBPickInfos;
00097 typedef class FBSDK_DLL FBArrayTemplate<FBPickInfos> FBPickInfosList;
00098 
00099 FB_DEFINE_COMPONENT( FBSDK_DLL, Take );
00100 FB_DEFINE_COMPONENT( FBSDK_DLL, Renderer );
00101 
00103 // Utility function
00105 // For internal use only.
00106 
00112 FBSDK_DLL HIObject      FBGetFBObject( HIObject pObject, bool pAutoCreate=false );
00113 
00119 template<class T> inline T* FBCast(HIObject pObject, bool pAutoCreate = false)
00120 {
00121     HIObject lObject = FBGetFBObject(pObject, pAutoCreate);
00122     // Should also validate type but not available for now
00123     return (T*)lObject;
00124 }
00125 
00127 // FBSystem
00129 __FB_FORWARD( FBSystem );
00130 
00147 class FBSDK_DLL FBSystem : public FBComponent {
00148     __FBClassDeclare( FBSystem,FBComponent );
00149 public:
00152     FBSystem();
00153 
00154     FBPropertyString                        ConfigPath;                 // < <b>Read Only Property:</b> Location where the config folder is.
00155     FBPropertyString                        UserConfigPath;             // < <b>Read Only Property:</b> Location where the user config folder is.
00156     FBPropertyString                        ApplicationPath;            
00157     FBPropertyString                        TempPath;                   
00158     FBPropertyEventUIIdle                   OnUIIdle;                   
00159     FBPropertyEventConnectionNotify         OnConnectionNotify;         
00160     FBPropertyEventConnectionDataNotify     OnConnectionDataNotify;     
00161     FBPropertyEventConnectionStateNotify    OnConnectionStateNotify;    
00162     FBPropertyEventConnectionKeyingNotify   OnConnectionKeyingNotify;   
00163 
00164     FBPropertyString                        ComputerName;               
00165     FBPropertyDouble                        Version;                    
00166     FBPropertyString                        BuildId;                    
00167 
00168                                                                         
00169     FBPropertyTime                          SystemTime;                 
00170     FBPropertyTime                          LocalTime;                  
00171     FBPropertyTake                          CurrentTake;                
00172                                                                         
00173     FBPropertyScene                         Scene;                      
00174                                                                         
00175     FBPropertyModel                         SceneRootModel;             
00176     FBPropertyModel                         RootModel;                  
00177     FBPropertyString                        PathImages;                 
00178     FBPropertyString                        PathMeshs;                  
00179                                                                         
00180 #if !defined(K_NO_AUDIO)
00181     FBPropertyListAudioIn                   AudioInputs;                
00182     FBPropertyListAudioOut                  AudioOutputs;               
00183 #endif
00184 
00185 #if !defined(K_NO_VIDEO)
00186     FBPropertyListVideoIn                   VideoInputs;                
00187     FBPropertyListVideoOut                  VideoOutputs;               
00188 #endif                                                                  
00189                                                                         
00190     FBPropertyListCommPort                  CommPorts;                  
00191     FBPropertyRenderer                      Renderer;                   
00192                                                                         
00193     FBPropertyDouble                        FrameRate;                  
00194     FBPropertyDouble                        ProcessMemory;              
00195     FBPropertyDouble                        ProcessMemoryPeak;          
00196     FBPropertyVector2d                      DesktopSize;                
00197     FBPropertyBool                          FullScreenViewer;           
00198 
00199 #if !defined(K_NO_ASSETMNG)
00200     FBPropertyAssetMng                      AssetManager;               
00201 #endif
00202 
00203 #if !defined(K_NO_MANIPULATOR)
00204     FBPropertyListManipulator               Manipulators;   
00205 #endif
00206 
00211     static bool  LibraryLoad(const char *pPath);
00217     static void* LibraryGetProcAddress(const char *pPath, const char *pFunctionName);
00222     static bool  LibraryFree(const char *pPath);
00223 
00227     static FBString CurrentDirectory();
00228 
00233     static FBString MakeFullPath(const char* pRelativeFilePath);
00234 
00238     static FBSystem& TheOne();
00239 };
00240 
00241 #ifndef K_NO_TRIGGER
00242 
00243 // FBTriggerManager
00245 __FB_FORWARD( FBTriggerManager );
00249 class FBSDK_DLL FBTriggerManager :public FBComponent 
00250 {
00251     __FBClassDeclare( FBTriggerManager, FBComponent );
00252   public:
00255     FBTriggerManager();
00256 
00260     int GetGroupCount();
00261 
00266     char* GetGroupName( int pIndex );
00267 
00272     bool GetGroupActive( int pIndex );
00273 
00278     void SetGroupActive( int pIndex, bool pState );
00279 
00280     FBPropertyBool      Active;     
00281 };
00282 #endif
00283 
00285 // FBBatchOptions
00287 FB_FORWARD( FBBatchOptions );
00288 
00290 enum FBBatchProcessType
00291 {
00292     kFBBatchProcessTypeLoad,    
00293     kFBBatchProcessTypeSave,    
00294     kFBBatchProcessTypeConvert  
00295 };
00296 FB_DEFINE_ENUM( FBSDK_DLL, BatchProcessType );
00297 
00299 enum FBBatchFileFormat
00300 {
00301     kFBBatchFileFormatTRC,      
00302     kFBBatchFileFormatC3D,      
00303     kFBBatchFileFormatAMC,      
00304     kFBBatchFileFormatBVH,      
00305     kFBBatchFileFormatHTR,      
00306     kFBBatchFileFormatFBX       
00307 };
00308 FB_DEFINE_ENUM( FBSDK_DLL, BatchFileFormat );
00309 
00311 enum FBBatchOnTakeExist
00312 {
00313     kFBBatchOnTakeExistOverwrite,   
00314     kFBBatchOnTakeExistSkip         
00315 };
00316 FB_DEFINE_ENUM( FBSDK_DLL, BatchOnTakeExist );
00317 
00319 enum FBBatchOnContainsBatchTakes
00320 {
00321     kFBBatchOnContainsBatchTakesSaveBatchTakesOnly, 
00322     kFBBatchOnContainsBatchTakesSaveAllTakes        
00323 };
00324 FB_DEFINE_ENUM( FBSDK_DLL, BatchOnContainsBatchTakes );
00325 
00327 enum FBBatchStatus
00328 {
00329     kFBBatchStatusSuccess,
00330     kFBBatchStatusError,
00331     kFBBatchStatusCharacterNotSpecified,
00332     kFBBatchStatusCharacterNotCharacterized,
00333     kFBBatchStatusCharacterHasNoReference,
00334     kFBBatchStatusInputActorNotSpecified,
00335     kFBBatchStatusActorInputMarkersetNotSpecified,
00336     kFBBatchStatusActorInputMarkersetHasNoReferenceModel,
00337     kFBBatchStatusActorInputMarkersetNotCorrectlyAssociated,
00338     kFBBatchStatusInputCharacterNotCharacterized,
00339     kFBBatchStatusInputCharacterHasNoReference,
00340     kFBBatchStatusInputDirectoryNotValid,
00341     kFBBatchStatusAsfSkeletonFileNotSpecified,
00342     kFBBatchStatusCantOpenAsfSkeletonFile,
00343     kFBBatchStatusOutputDirectoryNotValid
00344 };
00345 
00347 class FBSDK_DLL FBBatchOptions
00348 {
00349   public:
00350 
00353     FBBatchOptions();
00354 
00355     FBBatchFileFormat       mInputFileFormat;           
00356     FBBatchFileFormat       mOutputFileFormat;          
00357                                                         
00358     FBBatchProcessType      mProcessType;               
00359                                                         
00360     FBString                mInputDirectory;            
00361     FBString                mOutputDirectory;           
00362     FBString                mSkeletonFile;              
00363 
00364 #if !defined(K_NO_CHARACTER)
00365     FBCharacter*            mCharacter;                 
00366 #endif
00367                                                         
00368     bool                    mStartAnimationAtZero;      
00369     bool                    mFrameAnimation;            
00370     bool                    mOverwriteScaling;          
00371     bool                    mKeepDummyBones;            
00372     bool                    mWriteRate;                 
00373     bool                    mWriteTranslation;          
00374     bool                    mPlotToCharacter;           
00375     bool                    mPlotToControlSet;          
00376     bool                    mUseSingleTake;             
00377     bool                    mUseBatchSuffix;            
00378     bool                    mKeepCharacterConstraint;   
00379 
00380     FBBatchOnTakeExist          mOnTakeExistAction;             
00381     FBBatchOnContainsBatchTakes mOnContainsBatchTakesAction;    
00382 };
00383 
00384 
00386 // FBPlotOptions
00388 FB_FORWARD( FBPlotOptions );
00389 
00391 enum FBRotationFilter
00392 {
00393     kFBRotationFilterNone,
00394     kFBRotationFilterGimbleKiller,
00395     kFBRotationFilterUnroll
00396 };
00397 FB_DEFINE_ENUM( FBSDK_DLL, RotationFilter );
00398 
00400 class FBSDK_DLL FBPlotOptions
00401 {
00402   public:
00403 
00406     FBPlotOptions();
00407 
00408     bool                mPlotAllTakes;                  
00409     bool                mPlotOnFrame;                   
00410     FBTime              mPlotPeriod;                    
00411     FBRotationFilter    mRotationFilterToApply;         
00412     bool                mUseConstantKeyReducer;         
00413     bool                mConstantKeyReducerKeepOneKey;  
00414     bool                mPlotTranslationOnRootOnly;     
00415     bool                mPreciseTimeDiscontinuities;    
00416 };
00417 
00418 #if !defined(K_NO_AUDIO)
00419 
00420 // FBAudioRenderOptions
00422 FB_FORWARD( FBAudioRenderOptions );
00423 
00427 class FBSDK_DLL FBAudioRenderOptions
00428 {
00429 public:
00430     
00433     FBAudioRenderOptions();
00434 
00435     FBTimeSpan              TimeSpan;       
00436     FBAudioChannelMode      ChannelMode;    
00437     FBAudioBitDepthMode     BitDepthMode;   
00438     FBAudioRateMode         RateMode;       
00439     FBString                OutputFileName; 
00440 };
00442 typedef FBAudioRenderOptions* HFBAudioRenderOptions;
00443 #endif
00444 
00446 // FBApplication
00448 __FB_FORWARD( FBApplication );
00449 #if !defined(K_NO_CHARACTER)
00450 __FB_FORWARD( FBCharacter );
00451 #endif
00452 #if !defined(K_NO_ACTOR)
00453 __FB_FORWARD( FBActor );
00454 #endif
00455 #if !defined(K_NO_CHARACTER)
00456 FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
00457 #endif
00458 #if !defined(K_NO_ACTOR)
00459 FB_DEFINE_COMPONENT( FBSDK_DLL, Actor );
00460 #endif
00461 
00463 enum FBViewerMode { 
00464     kFBViewerModeOneWindow,     
00465     kFBViewerModeTwoWindow,     
00466     kFBViewerModeThreeWindow,   
00467     kFBViewerModeFourWindow,    
00468     kFBViewerModeSchematic      
00469 };
00470 
00485 class FBSDK_DLL FBApplication : public FBComponent 
00486 {
00487     __FBClassDeclare( FBApplication,FBComponent );
00488 public:
00492     FBApplication(HIObject pObject=NULL);
00493 
00494     FBPropertyEvent OnFileNewCompleted;     
00495     FBPropertyEvent OnFileNew;              
00496     FBPropertyEvent OnFileOpenCompleted;    
00497     FBPropertyEvent OnFileOpen;             
00498     FBPropertyEvent OnFileMerge;            
00499     FBPropertyEvent OnFileSaveCompleted;    
00500     FBPropertyEvent OnFileSave;             
00501     FBPropertyEvent OnFileExit;             
00502 
00507     bool Minimize(bool pBlocking=true);
00508 
00512     bool Maximize();
00513 
00517     bool FileNew();
00518 
00526     bool FileOpen( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00527     bool FileOpen( void* pBuffer, kULong pBufferLength );       
00528     bool GetMaxFrameCount(void* pMemAddr, kULong pSize, kLong* pFrameCount, int pTimeScale);    
00529 
00537     bool FileMerge( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00538 
00546     bool FileMerge( FBStringList& pPathlist, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00547 
00556     bool FileAppend( const char* pFilename, bool pShowUIMsg = false, FBFbxOptions* pOptions = NULL );
00557 
00563     bool FileSave( const char* pFilename = NULL, FBFbxOptions* pOptions = NULL );
00564 
00569     void FileExit( bool pSave = false );
00570 
00586     bool FileImport( FBString pFilename, bool pMatchModels = false, bool pCreateUnmatchedModels = true );
00587 
00599     bool FileExport( FBString pFilename );
00600 
00607     FBBatchStatus FileBatch( HFBBatchOptions pBatchOptions, HFBPlotOptions pPlotOptions = NULL );
00608 
00617     bool FileImportBatch( const char* pName, HFBBatchOptions pBatchOptions, FBModel* pReference );
00618 
00628     bool FileExportBatch( const char* pName, HFBTake pTake, HFBBatchOptions pBatchOptions, FBModelList &pExportModels );
00629 
00630 #if !defined(K_NO_CHARACTER)
00631 
00638    bool SaveCharacterRigAndAnimation( const char* pFileName, FBCharacter* pCharacter, HFBFbxOptions pFbxOptions);
00639 
00647     bool LoadAnimationOnCharacter( const char* pFileName, FBCharacter* pCharacter,  HFBFbxOptions pFbxOptions, HFBPlotOptions pPlotOptions);
00648 #endif
00649 
00654     bool IsValidBatchFile( const char* pFilename );
00655 
00663     bool FileRender( FBVideoGrabOptions* pRenderOptions = NULL );
00664 
00665 #if !defined(K_NO_AUDIO)
00666 
00671     bool AudioRender( HFBAudioRenderOptions pAudioRenderOptions  = NULL);
00672 #endif
00673 
00679     bool ExecuteScript(FBString pFilename);
00680 
00684     void SwitchViewerCamera( FBCamera &pCamera );
00685 
00686 // Temporary export for QA tests
00687 
00694     K_DEPRECATED bool FBXFileOpen( const char* pFilename, FBFbxOptions* pOptions = NULL );
00695     
00702     K_DEPRECATED bool FBXFileMerge( const char* pFilename, FBFbxOptions* pOptions = NULL );
00703     
00710     K_DEPRECATED bool FBXFileAppend( const char* pFilename, FBFbxOptions* pOptions = NULL );
00711 
00717     K_DEPRECATED bool FBXFileSave( const char* pFilename = NULL, FBFbxOptions* pOptions = NULL );
00718 
00719 public:
00720     FBPropertyString        FBXFileName;            
00721 #if !defined(K_NO_ACTOR)
00722     FBPropertyActor         CurrentActor;           
00723 #endif
00724 #if !defined(K_NO_CHARACTER)
00725     FBPropertyCharacter     CurrentCharacter;       
00726 #endif
00727 
00730     static FBApplication& TheOne();
00731 };
00732 
00733 
00735 // FBPlayerControl
00737 
00738 __FB_FORWARD( FBPlayerControl );
00739 
00740 
00741 
00742 
00744 enum FBTransportMode {  
00745     kFBTransportPlay,               kFBTransportPlayPrepare,        kFBTransportPlayReady,
00746     kFBTransportStop,               kFBTransportStopPost,           kFBTransportStopReady,
00747     kFBTransportShuttle,            kFBTransportShuttlePrepare,     kFBTransportShuttleReady,
00748     kFBTransportPlayReverse,        kFBTransportPlayReversePrepare, kFBTransportPlayReverseReady,
00749     kFBTransportJog,                kFBTransportJogPrepare,         kFBTransportJogReady,
00750     kFBTransportGoto,               kFBTransportGotoPrepare,        kFBTransportGotoReady,
00751     kFBTransportStepForward,        kFBTransportStepForwardPrepare, kFBTransportStepForwardReady,
00752     kFBTransportStepBackward,       kFBTransportStepBackwardPrepare,kFBTransportStepBackwardReady
00753 };
00754 FB_DEFINE_ENUM( FBSDK_DLL, TransportMode );
00755 
00757 enum FBTransportTimeFormat
00758 {
00759     kFBTimeFormatTimecode, 
00760     kFBTimeFormatFrame, 
00761 };
00762 
00763 FB_DEFINE_ENUM(FBSDK_DLL, TransportTimeFormat);
00764 
00765 
00767 enum FBTransportPlaySpeed
00768 {
00769     kFBSpeed_1_10x, 
00770     kFBSpeed_1_5x,  
00771     kFBSpeed_1_4x,  
00772     kFBSpeed_1_3x,  
00773     kFBSpeed_1_2x,  
00774     kFBSpeed_1x,    
00775     kFBSpeed_ALL_FR, 
00776     kFBSpeed_2x,    
00777     kFBSpeed_3x,    
00778     kFBSpeed_4x,    
00779     kFBSpeed_5x,    
00780     kFBSpeed_10x    
00781 };
00782 FB_DEFINE_ENUM( FBSDK_DLL, TransportPlaySpeed);
00783 
00785 enum FBTransportSnapMode
00786 {
00787     kFBTransportSnapModeNoSnap,              
00788     kFBTransportSnapModeSnapOnFrames,        
00789     kFBTransportSnapModePlayOnFrames,        
00790     kFBTransportSnapModeSnapAndPlayOnFrames, 
00791 };
00792 FB_DEFINE_ENUM( FBSDK_DLL, TransportSnapMode );
00793 
00794 
00809 class FBSDK_DLL FBPlayerControl : public FBComponent {
00810     __FBClassDeclare( FBPlayerControl,FBComponent );
00811 public:
00812 
00816     FBPlayerControl(HIObject pObject=NULL);
00817 
00822     bool Play(bool pUseMarkers = false);
00823 
00828     bool PlayReverse(bool pUseMarkers = false);
00829 
00833     void SetPlaySpeed (FBTransportPlaySpeed pPlaySpeed );
00834 
00838     FBTransportPlaySpeed GetPlaySpeed();
00839 
00843     bool Stop();
00844 
00848     bool GotoStart();
00849 
00853     bool GotoEnd();
00854 
00859     bool Goto( FBTime pTime );
00860 
00864     bool StepForward();
00865 
00869     bool StepBackward();
00870 
00876     bool Record( bool pOverrideTake=false,bool pCopyData=true );
00877     
00882     void LockTransport( bool );
00883 
00887     bool IsLocked(); 
00888     
00892     FBTransportMode GetTransportMode();
00893     
00898     void       SetTransportFps ( FBTimeMode pTimeMode, double pCustom=0.0);
00899 
00903     FBTimeMode GetTransportFps ();
00904 
00908     double     GetTransportFpsValue ();
00909     
00913     void Key();
00914 
00917     void GotoNextKey();
00918 
00921     void GotoPreviousKey();
00922 
00925     void EvaluationPause();
00926 
00929     void EvaluationResume();
00930 
00931     FBPropertyBool  LoopActive;     
00932     FBPropertyTime  LoopStart;      
00933     FBPropertyTime  LoopStop;       
00934 
00935     FBPropertyTime  ZoomWindowStart;    
00936     FBPropertyTime  ZoomWindowStop;     
00937 
00938     FBPropertyTime  NextMarker;     
00939     FBPropertyTime  PreviousMarker; 
00940 
00941     FBPropertyBool  IsRecording;    
00942     FBPropertyBool  IsPlaying;      
00943     FBPropertyBool  IsPlotting;     
00944 
00945     FBPropertyTransportSnapMode SnapMode;   
00946 
00947     FBPropertyTransportTimeFormat TransportTimeFormat; 
00948 
00949     FBPropertyTime  RecordingSamplingPeriod;    
00950     FBPropertyTime  PlotSamplingPeriod;         
00951 
00955     static FBPlayerControl& TheOne();
00956 };
00957 
00959 // FBEvaluateManager
00961 
00963 enum FBParallelScheduleType
00964 {
00965     kFBParallelScheduleSerial,      
00966     kFBParallelScheduleSimple,      
00967     kFBParallelScheduleAdvanced,    
00968 };
00969 
00973 enum FBGlobalEvalCallbackTiming
00974 {
00975     kFBGlobalEvalCallbackBeforeDAG,     
00976     kFBGlobalEvalCallbackAfterDAG,      
00977     kFBGlobalEvalCallbackAfterDeform,   
00978 };
00979 
00980 typedef void (*kFBEvaluationGlobalFunctionCallback)(FBEvaluateInfo* pEvaluteInfo);
00981 
00982 FB_DEFINE_ENUM(FBSDK_DLL, ParallelScheduleType);
00983 
00988 __FB_FORWARD( FBEvaluateManager );
00989 class FBSDK_DLL FBEvaluateManager : public FBComponent 
00990 {
00991     __FBClassDeclare( FBEvaluateManager,FBComponent );
00992 
00993 public:
00994 
00998     FBEvaluateManager(HIObject pObject=NULL);
00999 
01000     FBPropertyBool                  ParallelPipeline;            
01001     FBPropertyBool                  ParallelDeformation;         
01002     FBPropertyBool                  UseGPUDeformation;           
01003     FBPropertyBool                  FrameSkipOptimization;       
01004     FBPropertyParallelScheduleType  ParallelScheduleType;        
01005     FBPropertyBool                  ParallelEvaluation;          
01006 
01007     FBPropertyInt                   NodeCount;                   
01008     FBPropertyInt                   DeviceCount;                 
01009 
01011     void InvalidateDAG();
01012 
01017     void RegisterEvaluationGlobalFunction  (kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
01018 
01023     void UnregisterEvaluationGlobalFunction(kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
01024 
01028     static FBEvaluateManager& TheOne();
01029 };
01030 
01032 // FBKeyControl
01034 __FB_FORWARD( FBKeyControl );
01035 
01039 class FBSDK_DLL FBKeyControl : public FBComponent
01040 {
01041     __FBClassDeclare(FBKeyControl, FBComponent);
01042 
01043 public:
01047     FBKeyControl(HIObject pObject=NULL);
01048 
01049     FBPropertyBool  AutoKey;    
01050 };
01051 
01053 // FBPointCacheManager
01055 __FB_FORWARD( FBPointCacheManager );
01056 
01060 class FBSDK_DLL FBPointCacheManager : public FBComponent
01061 {
01062     __FBClassDeclare(FBPointCacheManager, FBComponent);
01063 
01068     FBPointCacheManager(HIObject pObject=NULL);
01069 
01070 public:
01071     FBPropertyListObject   Models;                  
01072 
01073     FBPropertyBool         ApplyGlobalTransform;    
01074     FBPropertyAction       SetTransformReference;   
01075 
01076     FBPropertyBool         ApplyCacheOnNewModel;    
01077     FBPropertyModel        NewModelRoot;            
01078 
01079     FBPropertyBool         AllowCacheResampling;    
01080     FBPropertyBool         AlwaysAskForPath;        
01081     FBPropertyString       DefaultPath;             
01082     FBPropertyBool         CacheNormal;             
01083     FBPropertyBool         CacheAABBox;             
01084     FBPropertyBool         CreateMultiChannelCache; 
01085     FBPropertyBool         CreateFilePerFrameCache; 
01086     FBPropertyInt          SaveEveryFrame;          
01087 
01091     static FBPointCacheManager& TheOne();
01092 };
01093 
01095 // FBFileMonitoringManager
01097 __FB_FORWARD( FBFileMonitoringManager );
01101 enum FBFileMonitoringType   {
01102     kFBFileMonitoring_InvalidIndex, 
01103     kFBFileMonitoring_MAINSCENE,    
01104     kFBFileMonitoring_ANIMATIONCLIP,
01105 };
01106 
01107 FB_DEFINE_ENUM( FBSDK_DLL, FileMonitoringType );
01108 
01109 __FB_FORWARD( FBEventFileChange );
01110 
01114 class FBSDK_DLL FBEventFileChange: public FBEvent 
01115 {
01116   public:
01117 
01121     FBEventFileChange( HKEventBase pEvent );        
01122 
01123     FBPropertyFileMonitoringType    Type;        
01124     FBPropertyString                Path;        
01125 };
01126 
01130 class FBSDK_DLL FBFileMonitoringManager : public FBComponent
01131 {
01132     __FBClassDeclare(FBFileMonitoringManager, FBComponent);
01133 
01138     FBFileMonitoringManager(HIObject pObject=NULL);
01139 
01140 public:
01145     void AddFileToMonitor(FBString pFilePath, FBFileMonitoringType pFileMonitoringType );
01146 
01150     void RemoveFileFromMonitor(FBString pFilePath);
01151 
01155     void PauseFileMonitoring(bool pPause = true);
01156 
01159     void CleanFileMonitoring();
01160 
01161 public:
01162     FBPropertyEvent    OnFileChangeMainScene;           
01163     FBPropertyEvent    OnFileChangeAnimationClip;       
01164 
01167     static FBFileMonitoringManager& TheOne();
01168 };
01169 
01171 // FBCriticalSection
01173 FB_FORWARD( FBCriticalSection );
01174 
01179 class FBSDK_DLL FBCriticalSection
01180 {
01181     void *mPtr;     
01182 public:
01184     FBCriticalSection();
01185 
01187     ~FBCriticalSection();
01188 
01192     bool Init();
01193 
01195     void Enter();
01196 
01198     void Leave();
01199 };
01200 
01202 // FBFastLock
01204 FB_FORWARD( FBFastLock );
01205 
01212 class FBSDK_DLL FBFastLock 
01213 {
01214     void *mPtr;     
01215 public:
01217     FBFastLock();
01218 
01220     ~FBFastLock();
01221 
01223     void Lock();
01224 
01226     void Unlock();
01227 };
01228 
01230 // FBReferenceTime
01232 __FB_FORWARD( FBReferenceTime );
01233 
01235 class FBSDK_DLL FBReferenceTime : public FBComponent {
01236     __FBClassDeclare( FBReferenceTime,FBComponent );
01237 public:
01241     FBReferenceTime(HIObject pObject=NULL);
01242 
01247     int    Add( const char *pName );
01248 
01252     void   Remove( int pIndex );
01253 
01259     void   SetTime( int pIndex, FBTime pReferenceTime, FBTime pSystem );
01265     FBTime GetTime( int pIndex, FBTime pSystem );
01266 
01271     const char *operator[](int pIndex);
01272 
01273     FBPropertyInt               Count;          
01274     FBPropertyInt               ItemIndex;      
01275 };
01276 
01278 // Global utility functions
01280 
01281 
01288 FBSDK_DLL FBModelList* FBCreateModelList();
01289 
01293 FBSDK_DLL void FBDestroyModelList( FBModelList* pModelList );
01294 
01301 FBSDK_DLL FBPickInfosList* FBCreatePickInfosList();
01302 
01306 FBSDK_DLL void FBDestroyPickInfosList( FBPickInfosList* pPickInfosList );
01307 
01314 FBSDK_DLL FBPlugList* FBCreatePlugList();
01315 
01319 FBSDK_DLL void FBDestroyPlugList( FBPlugList* pPlugList );
01320 
01327 FBSDK_DLL FBComponentList* FBCreateComponentList();
01328 
01332 FBSDK_DLL void FBDestroyComponentList( FBComponentList* pObjectList );
01333 
01334 
01339 FBSDK_DLL void FBSleep( kULong MilliSeconds );
01340 
01345 FBSDK_DLL void FBSchedulingDependencyOutput( bool pEnable );
01346 
01354 K_DEPRECATED FBSDK_DLL FBModel* FBFindModelByName( const char* pModelName, FBModel* pParent=NULL  );
01355 
01364 FBSDK_DLL FBModel* FBFindModelByLabelName( const char* pModelLabelName );
01365 
01371 FBSDK_DLL FBModel* FBFindModelByUniqueColorId( const FBColor& pColor );
01372 
01377 FBSDK_DLL FBModel* FBLoadFbxPrimitivesModel( const char* pModelName );
01378 
01386 FBSDK_DLL void FBFindModelsOfType( FBModelList& pList, int pTypeInfo, FBModel* pParent=NULL );
01387 
01397 FBSDK_DLL void FBGetSelectedModels( FBModelList& pList, FBModel* pParent=NULL, bool pSelected=true, bool pSortBySelectOrder = false );
01398 
01406 FBSDK_DLL void FBFindObjectsByName( const char* pNamePattern, FBComponentList& pList, bool pIncludeNamespace = true, bool pModelsOnly = false );
01407 
01416 FBSDK_DLL FBComponent* FBFindObjectByFullName( const char* pObjectFullName );
01417 
01426 FBSDK_DLL int FBDeleteObjectsByName( const char* pNamePattern, const char* pNameSpace = NULL, const char* pGroupName = NULL);
01427 
01431 FBSDK_DLL void FBBeginChangeAllModels();
01432 
01435 FBSDK_DLL void FBEndChangeAllModels();
01436 
01440 FBSDK_DLL void FBMergeTransactionBegin();
01441 
01444 FBSDK_DLL void FBMergeTransactionEnd();
01445 
01446 
01455 FBSDK_DLL void FBTrace( const char* pFormatString, ... );
01456 
01457 
01464 FBSDK_DLL void FBMakeFullPath( FBString &pFullPath, const char *pRootPath, const char *pFilePath );
01465 
01468 class FBSDK_DLL FBVisitDirectoryCallback
01469 {
01470 public:
01471     virtual ~FBVisitDirectoryCallback();
01472     virtual void FileVisited(const char*  pSrc) const;
01473     virtual void DirectoryVisited(const char*  pSrc) const;
01474     bool DoIt( const char* pSrcPath, bool pRecursive ) const;
01475 };
01476 
01477 #if !defined(K_NO_UI)
01478 
01483 FBSDK_DLL bool FBPopNormalTool( const char* pToolName, bool pSetFocus = true );
01484 
01485 #endif
01486 
01487 #ifdef FBSDKUseNamespace
01488     }
01489 #endif
01490 #endif
01491