FBX SDK Reference Guide: kfbxglobaltimesettings.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_GLOBAL_TIME_SETTINGS_H_
00005 #define _FBXSDK_GLOBAL_TIME_SETTINGS_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright  2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 
00049 #include <klib/kstring.h>
00050 #include <klib/karrayul.h>
00051 #include <klib/ktime.h>
00052 #include <klib/kerror.h>
00053 
00054 #ifndef MB_FBXSDK
00055 #include <kbaselib_nsuse.h>
00056 #endif
00057 
00058 #include <fbxfilesdk_nsbegin.h>
00059 
00060 class KFbxGlobalTimeSettingsProperties;
00061 
00065 class KFBX_DLL KFbxGlobalTimeSettings
00066 {
00067 
00068 public:
00069 
00071     void RestoreDefaultSettings();
00072 
00076     void SetTimeMode(KTime::ETimeMode pTimeMode);
00077 
00081     KTime::ETimeMode GetTimeMode();
00082 
00086     void SetTimeProtocol(KTime::ETimeProtocol pTimeProtocol);
00087 
00091     KTime::ETimeProtocol GetTimeProtocol();
00092 
00099     typedef enum
00100     {
00101         eNO_SNAP,
00102         eSNAP_ON_FRAME,
00103         ePLAY_ON_FRAME,
00104         eSNAP_PLAY_ON_FRAME
00105     } ESnapOnFrameMode;
00106 
00110     void SetSnapOnFrameMode(ESnapOnFrameMode pSnapOnFrameMode);
00111 
00115     ESnapOnFrameMode GetSnapOnFrameMode();
00116 
00121 
00125     void SetTimelineDefautTimeSpan(const KTimeSpan& pTimeSpan);
00126 
00130     void GetTimelineDefautTimeSpan(KTimeSpan& pTimeSpan) const;
00131 
00133 
00138 
00139     struct KFbxTimeMarker
00140     {
00141         KFbxTimeMarker();
00142         KFbxTimeMarker(const KFbxTimeMarker& pTimeMarker);
00143         KFbxTimeMarker& operator=(const KFbxTimeMarker& pTimeMarker);
00144 
00145         KString mName; 
00146         KTime mTime; 
00147         bool mLoop; 
00148     };
00149 
00153     int GetTimeMarkerCount();
00154 
00160     bool SetCurrentTimeMarker(int pIndex);
00161 
00165     int GetCurrentTimeMarker();
00166 
00172     KFbxTimeMarker* GetTimeMarker(int pIndex);
00173 
00177     void AddTimeMarker(KFbxTimeMarker pTimeMarker);
00178 
00180     void RemoveAllTimeMarkers();
00181 
00183 
00185     const KFbxGlobalTimeSettings& operator=(const KFbxGlobalTimeSettings& pGlobalTimeSettings);
00186 
00191 
00195     KError& GetError();
00196 
00202     typedef enum
00203     {
00204         eINDEX_OUT_OF_RANGE,
00205         eERROR_COUNT
00206     } EError;
00207 
00211     EError GetLastErrorID() const;
00212 
00216     const char* GetLastErrorString() const;
00217 
00219 
00225 
00230     void SetSnapOnFrame(bool pSnapOnFrame);
00231 
00236     bool GetSnapOnFrame();
00237 
00239 
00241 //
00242 //  WARNING!
00243 //
00244 //  Anything beyond these lines may not be documented accurately and is
00245 //  subject to change without notice.
00246 //
00248 
00249 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00250 
00251 private:
00252 
00253     KFbxGlobalTimeSettings();
00254     ~KFbxGlobalTimeSettings();
00255 
00256     KFbxGlobalTimeSettingsProperties* mPH;
00257 
00258     friend class KFbxScene;
00259 
00260 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00261 
00262 };
00263 
00264 #include <fbxfilesdk_nsend.h>
00265 
00266 #endif // #ifndef _FBXSDK_GLOBAL_TIME_SETTINGS_H_
00267 
00268