kfbxglobaltimesettings.h

Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXGLOBALTIMESETTINGS_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXGLOBALTIMESETTINGS_H
00006 
00007 /**************************************************************************************
00008 
00009  Copyright (C) 2001 - 2009 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 #include <fbxfilesdk/fbxfilesdk_def.h>
00042 
00043 #include <fbxfilesdk/components/kbaselib/klib/kstring.h>
00044 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00045 #include <fbxfilesdk/components/kbaselib/klib/ktime.h>
00046 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00047 
00048 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00049 
00050 class KFbxGlobalTimeSettingsProperties;
00051 
00058 class KFBX_DLL KFbxGlobalTimeSettings
00059 {
00060 
00061 public:
00062     KFBXNEW_DECLARE_FRIEND
00063 
00065     void RestoreDefaultSettings();
00066 
00070     void SetTimeMode(KTime::ETimeMode pTimeMode);
00071 
00075     KTime::ETimeMode GetTimeMode() const;
00076 
00080     void SetTimeProtocol(KTime::ETimeProtocol pTimeProtocol);
00081 
00085     KTime::ETimeProtocol GetTimeProtocol() const;
00086 
00093     typedef enum
00094     {
00095         eNO_SNAP,
00096         eSNAP_ON_FRAME,
00097         ePLAY_ON_FRAME,
00098         eSNAP_PLAY_ON_FRAME
00099     } ESnapOnFrameMode;
00100 
00104     void SetSnapOnFrameMode(ESnapOnFrameMode pSnapOnFrameMode);
00105 
00109     ESnapOnFrameMode GetSnapOnFrameMode() const;
00110 
00115 
00119     void SetTimelineDefautTimeSpan(const KTimeSpan& pTimeSpan);
00120 
00124     void GetTimelineDefautTimeSpan(KTimeSpan& pTimeSpan) const;
00125 
00127 
00132 
00135     struct KFBX_DLL KFbxTimeMarker
00136     {
00138         KFbxTimeMarker();
00139 
00143         KFbxTimeMarker(const KFbxTimeMarker& pTimeMarker);
00144 
00148         KFbxTimeMarker& operator=(const KFbxTimeMarker& pTimeMarker);
00149 
00151         KString mName; 
00152 
00154         KTime mTime; 
00155 
00157         bool mLoop; 
00158     };
00159 
00163     int GetTimeMarkerCount() const;
00164 
00170     bool SetCurrentTimeMarker(int pIndex);
00171 
00175     int GetCurrentTimeMarker() const;
00176 
00182     KFbxTimeMarker* GetTimeMarker(int pIndex) const;
00183 
00187     void AddTimeMarker(KFbxTimeMarker pTimeMarker);
00188 
00190     void RemoveAllTimeMarkers();
00191 
00193 
00197     const KFbxGlobalTimeSettings& operator=(const KFbxGlobalTimeSettings& pGlobalTimeSettings);
00198 
00203 
00207     KError& GetError();
00208 
00213     typedef enum
00214     {
00215         eINDEX_OUT_OF_RANGE,
00216         eERROR_COUNT
00217     } EError;
00218 
00222     EError GetLastErrorID() const;
00223 
00227     const char* GetLastErrorString() const;
00228 
00230 
00236 
00241     void SetSnapOnFrame(bool pSnapOnFrame);
00242 
00247     bool GetSnapOnFrame() const;
00248 
00250 
00252 //
00253 //  WARNING!
00254 //
00255 //  Anything beyond these lines may not be documented accurately and is
00256 //  subject to change without notice.
00257 //
00259 
00260 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00261 
00262 private:
00263 
00264     KFbxGlobalTimeSettings();
00265     ~KFbxGlobalTimeSettings();
00266 
00267     KFbxGlobalTimeSettingsProperties* mPH;
00268 
00269     friend class KFbxScene;
00270 
00271 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00272 
00273 };
00274 
00275 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00276 
00277 #endif // FBXFILESDK_KFBXPLUGINS_KFBXGLOBALTIMESETTINGS_H
00278