00001 00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H 00005 #define FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_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 00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h> 00043 #include <fbxfilesdk/components/kbaselib/kaydara.h> 00044 00045 #include <fbxfilesdk/kfbxplugins/kfbxnodeattribute.h> 00046 #include <fbxfilesdk/fbxfilesdk_nsbegin.h> 00047 00048 class KFbxColor; 00049 class KFbxSdkManager; 00050 class KFbxTexture; 00051 00055 class KFBX_DLL KFbxLight : public KFbxNodeAttribute 00056 { 00057 KFBXOBJECT_DECLARE(KFbxLight,KFbxNodeAttribute); 00058 00059 public: 00060 00062 virtual EAttributeType GetAttributeType() const; 00063 00068 00074 typedef enum 00075 { 00076 ePOINT = 0, 00077 eDIRECTIONAL, 00078 eSPOT 00079 } ELightType; 00080 00088 typedef enum 00089 { 00090 eNONE = 0, 00091 eLINEAR, 00092 eQUADRATIC, 00093 eCUBIC 00094 } EDecayType; 00095 00096 00100 void SetShadowTexture( KFbxTexture* pTexture ); 00101 00105 KFbxTexture* GetShadowTexture() const; 00106 00108 00113 static const char* sLightType; 00114 static const char* sCastLight; 00115 static const char* sDrawVolumetricLight; 00116 static const char* sDrawGroundProjection; 00117 static const char* sDrawFrontFacingVolumetricLight; 00118 static const char* sColor; 00119 static const char* sIntensity; 00120 static const char* sHotSpot; // inner cone 00121 static const char* sConeAngle; // outer cone 00122 static const char* sFog; 00123 static const char* sDecayType; 00124 static const char* sDecayStart; 00125 static const char* sFileName; 00126 static const char* sEnableNearAttenuation; 00127 static const char* sNearAttenuationStart; 00128 static const char* sNearAttenuationEnd; 00129 static const char* sEnableFarAttenuation; 00130 static const char* sFarAttenuationStart; 00131 static const char* sFarAttenuationEnd; 00132 static const char* sCastShadows; 00133 static const char* sShadowColor; 00135 00140 static const ELightType sDefaultLightType; 00141 static const fbxBool1 sDefaultCastLight; 00142 static const fbxBool1 sDefaultDrawVolumetricLight; 00143 static const fbxBool1 sDefaultDrawGroundProjection; 00144 static const fbxBool1 sDefaultDrawFrontFacingVolumetricLight; 00145 static const fbxDouble3 sDefaultColor; 00146 static const fbxDouble1 sDefaultIntensity; 00147 static const fbxDouble1 sDefaultHotSpot; 00148 static const fbxDouble1 sDefaultConeAngle; 00149 static const fbxDouble1 sDefaultFog; 00150 static const EDecayType sDefaultDecayType; 00151 static const fbxDouble1 sDefaultDecayStart; 00152 static const fbxString sDefaultFileName; 00153 static const fbxBool1 sDefaultEnableNearAttenuation; 00154 static const fbxDouble1 sDefaultNearAttenuationStart; 00155 static const fbxDouble1 sDefaultNearAttenuationEnd; 00156 static const fbxBool1 sDefaultEnableFarAttenuation; 00157 static const fbxDouble1 sDefaultFarAttenuationStart; 00158 static const fbxDouble1 sDefaultFarAttenuationEnd; 00159 static const fbxBool1 sDefaultCastShadows; 00160 static const fbxDouble3 sDefaultShadowColor; 00162 00164 // 00165 // Properties 00166 // 00168 00173 00181 KFbxTypedProperty<ELightType> LightType; 00182 00190 KFbxTypedProperty<fbxBool1> CastLight; 00191 00199 KFbxTypedProperty<fbxBool1> DrawVolumetricLight; 00200 00208 KFbxTypedProperty<fbxBool1> DrawGroundProjection; 00209 00217 KFbxTypedProperty<fbxBool1> DrawFrontFacingVolumetricLight; 00218 00226 KFbxTypedProperty<fbxDouble3> Color; 00227 00235 KFbxTypedProperty<fbxDouble1> Intensity; 00236 00244 KFbxTypedProperty<fbxDouble1> HotSpot; 00245 00253 KFbxTypedProperty<fbxDouble1> ConeAngle; 00254 00262 KFbxTypedProperty<fbxDouble1> Fog; 00263 00271 KFbxTypedProperty<EDecayType> DecayType; 00272 00280 KFbxTypedProperty<fbxDouble1> DecayStart; 00281 00289 KFbxTypedProperty<fbxString> FileName; 00290 00298 KFbxTypedProperty<fbxBool1> EnableNearAttenuation; 00299 00307 KFbxTypedProperty<fbxDouble1> NearAttenuationStart; 00308 00316 KFbxTypedProperty<fbxDouble1> NearAttenuationEnd; 00317 00325 KFbxTypedProperty<fbxBool1> EnableFarAttenuation; 00326 00334 KFbxTypedProperty<fbxDouble1> FarAttenuationStart; 00335 00343 KFbxTypedProperty<fbxDouble1> FarAttenuationEnd; 00344 00352 KFbxTypedProperty<fbxBool1> CastShadows; 00353 00361 KFbxTypedProperty<fbxDouble3> ShadowColor; 00362 00364 00366 // 00367 // WARNING! 00368 // 00369 // Anything beyond these lines may not be documented accurately and is 00370 // subject to change without notice. 00371 // 00373 00374 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00375 00376 public: 00377 00378 // Clone 00379 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const; 00380 00381 protected: 00382 00383 KFbxLight(KFbxSdkManager& pManager, char const* pName); 00384 00386 KFbxLight& operator= (KFbxLight const& pLight); 00387 00388 virtual bool ConstructProperties(bool pForceSet); 00389 00393 virtual void Init(); 00394 00395 virtual KString GetTypeName() const; 00396 virtual KStringList GetTypeFlags() const; 00397 00398 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS 00399 00400 }; 00401 00402 typedef KFbxLight* HKFbxLight; 00403 00404 inline EFbxType FbxTypeOf( KFbxLight::ELightType const &pItem ) { return eENUM; } 00405 inline EFbxType FbxTypeOf( KFbxLight::EDecayType const &pItem ) { return eENUM; } 00406 00407 #include <fbxfilesdk/fbxfilesdk_nsend.h> 00408 00409 #endif // FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H 00410