fbxglobaltimesettings.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2012 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_FILEIO_GLOBAL_TIME_SETTINGS_H_
00014 #define _FBXSDK_FILEIO_GLOBAL_TIME_SETTINGS_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/core/base/fbxstring.h>
00019 #include <fbxsdk/core/base/fbxarray.h>
00020 #include <fbxsdk/core/base/fbxtime.h>
00021 #include <fbxsdk/core/base/fbxerror.h>
00022 
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024 
00025 class FbxGlobalTimeSettingsProperties;
00026 
00033 class FBXSDK_DLL FbxGlobalTimeSettings
00034 {
00035 
00036 public:
00037     FBXSDK_FRIEND_NEW();
00038 
00040     void RestoreDefaultSettings();
00041 
00045     void SetTimeMode(FbxTime::EMode pTimeMode);
00046 
00050     FbxTime::EMode GetTimeMode() const;
00051 
00055     void SetTimeProtocol(FbxTime::EProtocol pTimeProtocol);
00056 
00060     FbxTime::EProtocol GetTimeProtocol() const;
00061 
00064     enum ESnapOnFrameMode
00065     {
00066         eNoSnap,            
00067         eSnapOnFrame,       
00068         ePlayOnFrame,       
00069         eSnapAndPlayOnFrame 
00070     };
00071 
00075     void SetSnapOnFrameMode(ESnapOnFrameMode pSnapOnFrameMode);
00076 
00080     ESnapOnFrameMode GetSnapOnFrameMode() const;
00081 
00086 
00090     void SetTimelineDefautTimeSpan(const FbxTimeSpan& pTimeSpan);
00091 
00095     void GetTimelineDefautTimeSpan(FbxTimeSpan& pTimeSpan) const;
00096 
00098 
00103 
00106     struct FBXSDK_DLL TimeMarker
00107     {
00109         TimeMarker();
00110 
00114         TimeMarker(const TimeMarker& pTimeMarker);
00115 
00119         TimeMarker& operator=(const TimeMarker& pTimeMarker);
00120 
00122         FbxString mName; 
00123 
00125         FbxTime mTime; 
00126 
00128         bool mLoop; 
00129     };
00130 
00134     int GetTimeMarkerCount() const;
00135 
00141     bool SetCurrentTimeMarker(int pIndex);
00142 
00146     int GetCurrentTimeMarker() const;
00147 
00153     TimeMarker* GetTimeMarker(int pIndex) const;
00154 
00158     void AddTimeMarker(TimeMarker pTimeMarker);
00159 
00161     void RemoveAllTimeMarkers();
00162 
00164 
00168     const FbxGlobalTimeSettings& operator=(const FbxGlobalTimeSettings& pGlobalTimeSettings);
00169 
00174 
00178     FbxError& GetError();
00179 
00184     enum EErrorCode
00185     {
00186         eIndexOutOfRange,
00187         eErrorCount
00188     };
00189 
00193     EErrorCode GetLastErrorID() const;
00194 
00198     const char* GetLastErrorString() const;
00199 
00201 
00207 
00212     void SetSnapOnFrame(bool pSnapOnFrame);
00213 
00218     bool GetSnapOnFrame() const;
00219 
00221 
00223 //
00224 //  WARNING!
00225 //
00226 //  Anything beyond these lines may not be documented accurately and is
00227 //  subject to change without notice.
00228 //
00230 
00231 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00232 
00233 private:
00234 
00235     FbxGlobalTimeSettings();
00236     ~FbxGlobalTimeSettings();
00237 
00238     FbxGlobalTimeSettingsProperties* mPH;
00239 
00240     friend class FbxScene;
00241 
00242 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00243 
00244 };
00245 
00246 #include <fbxsdk/fbxsdk_nsend.h>
00247 
00248 #endif /* _FBXSDK_FILEIO_GLOBAL_TIME_SETTINGS_H_ */