00001 /**************************************************************************************** 00002 00003 Copyright (C) 2010 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 00015 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXGLOBALSETTINGS_H 00016 #define FBXFILESDK_KFBXPLUGINS_KFBXGLOBALSETTINGS_H 00017 00018 #include <fbxfilesdk/fbxfilesdk_def.h> 00019 00020 #include <fbxfilesdk/components/kbaselib/klib/kstring.h> 00021 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h> 00022 #include <fbxfilesdk/components/kbaselib/klib/ktime.h> 00023 #include <fbxfilesdk/components/kbaselib/klib/kerror.h> 00024 00025 #include <fbxfilesdk/kfbxplugins/kfbxaxissystem.h> 00026 #include <fbxfilesdk/kfbxplugins/kfbxsystemunit.h> 00027 #include <fbxfilesdk/kfbxplugins/kfbxobject.h> 00028 00029 #include <fbxfilesdk/fbxfilesdk_nsbegin.h> 00030 00034 class KFBX_DLL KFbxGlobalSettings : public KFbxObject 00035 { 00036 KFBXOBJECT_DECLARE(KFbxGlobalSettings,KFbxObject); 00037 00038 public: 00043 00047 void SetAxisSystem(const KFbxAxisSystem& pAxisSystem); 00048 00052 KFbxAxisSystem GetAxisSystem(); 00054 00058 void SetOriginalUpAxis(const KFbxAxisSystem& pAxisSystem); 00059 00063 int GetOriginalUpAxis() const; 00065 00070 00074 void SetSystemUnit(const KFbxSystemUnit& pOther); 00075 00079 KFbxSystemUnit GetSystemUnit() const; 00080 00084 void SetOriginalSystemUnit(const KFbxSystemUnit& pOther); 00085 00089 KFbxSystemUnit GetOriginalSystemUnit() const; 00091 00092 00097 00102 void SetAmbientColor(KFbxColor pAmbientColor); 00103 00107 KFbxColor GetAmbientColor() const; 00108 00110 00115 00117 static const char* ePRODUCER_PERSPECTIVE; 00118 00120 static const char* ePRODUCER_TOP; 00121 00123 static const char* ePRODUCER_FRONT; 00124 00126 static const char* ePRODUCER_BACK; 00127 00129 static const char* ePRODUCER_RIGHT; 00130 00132 static const char* ePRODUCER_LEFT; 00133 00135 static const char* ePRODUCER_BOTTOM; 00136 00144 bool SetDefaultCamera(const char* pCameraName); 00145 00149 KString GetDefaultCamera() const; 00151 00159 void SetTimeMode(KTime::ETimeMode pTimeMode); 00160 00164 KTime::ETimeMode GetTimeMode() const; 00165 00169 void SetTimelineDefaultTimeSpan(const KTimeSpan& pTimeSpan); 00170 00174 void GetTimelineDefaultTimeSpan(KTimeSpan& pTimeSpan) const; 00175 00179 void SetCustomFrameRate(double pCustomFrameRate); 00180 00184 double GetCustomFrameRate() const; 00186 00187 protected: 00188 00193 KFbxTypedProperty<fbxInteger1> UpAxis; 00194 KFbxTypedProperty<fbxInteger1> UpAxisSign; 00195 00196 KFbxTypedProperty<fbxInteger1> FrontAxis; 00197 KFbxTypedProperty<fbxInteger1> FrontAxisSign; 00198 00199 KFbxTypedProperty<fbxInteger1> CoordAxis; 00200 KFbxTypedProperty<fbxInteger1> CoordAxisSign; 00201 00202 KFbxTypedProperty<fbxInteger1> OriginalUpAxis; 00203 KFbxTypedProperty<fbxInteger1> OriginalUpAxisSign; 00204 00205 KFbxTypedProperty<fbxDouble1> UnitScaleFactor; 00206 KFbxTypedProperty<fbxDouble1> OriginalUnitScaleFactor; 00207 00208 KFbxTypedProperty<fbxDouble3> AmbientColor; 00209 KFbxTypedProperty<fbxString> DefaultCamera; 00210 KFbxTypedProperty<fbxEnum> TimeMode; 00211 KFbxTypedProperty<fbxTime> TimeSpanStart; 00212 KFbxTypedProperty<fbxTime> TimeSpanStop; 00213 KFbxTypedProperty<fbxDouble1> CustomFrameRate; 00215 00217 // 00218 // WARNING! 00219 // 00220 // Anything beyond these lines may not be documented accurately and is 00221 // subject to change without notice. 00222 // 00224 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00225 public: 00226 virtual KFbxObject& Copy(const KFbxObject& pObject); 00227 00228 protected: 00229 virtual void Construct(const KFbxGlobalSettings* pFrom); 00230 virtual bool ConstructProperties(bool pForceSet); 00231 00232 private: 00233 KFbxGlobalSettings(KFbxSdkManager& pManager, char const* pName); 00234 00235 void AxisSystemToProperties(); 00236 void PropertiesToAxisSystem(); 00237 00238 void Init(); 00239 00240 KFbxAxisSystem mAxisSystem; 00241 friend class KFbxScene; 00242 00243 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS 00244 }; 00245 00246 inline EFbxType FbxTypeOf( KTime::ETimeMode const &pItem ) { return eENUM; } 00247 00248 00249 #include <fbxfilesdk/fbxfilesdk_nsend.h> 00250 00251 #endif // FBXFILESDK_KFBXPLUGINS_KFBXGLOBALSETTINGS_H 00252