kfbxlight.h

Go to the documentation of this file.
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 #include <fbxfilesdk/fbxfilesdk_def.h>
00042 
00043 #include <fbxfilesdk/kfbxplugins/kfbxnodeattribute.h>
00044 
00045 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00046 
00047 class KFbxColor;
00048 class KFbxSdkManager;
00049 class KFbxTexture;
00050 
00054 class KFBX_DLL KFbxLight : public KFbxNodeAttribute
00055 {
00056     KFBXOBJECT_DECLARE(KFbxLight,KFbxNodeAttribute);
00057 
00058 public:
00059 
00061     virtual EAttributeType GetAttributeType() const;
00062 
00067 
00073     typedef enum  
00074     {
00075         ePOINT = 0, 
00076         eDIRECTIONAL, 
00077         eSPOT
00078     } ELightType;
00079 
00087     typedef enum  
00088     {
00089         eNONE = 0,
00090         eLINEAR,
00091         eQUADRATIC,
00092         eCUBIC
00093     } EDecayType;
00094 
00095 
00099     void SetShadowTexture( KFbxTexture* pTexture );
00100 
00104     KFbxTexture* GetShadowTexture() const;
00105 
00107 
00112     static const char*          sLightType;
00113     static const char*          sCastLight;
00114     static const char*          sDrawVolumetricLight;
00115     static const char*          sDrawGroundProjection;
00116     static const char*          sDrawFrontFacingVolumetricLight;
00117     static const char*          sColor;
00118     static const char*          sIntensity;
00119     static const char*          sHotSpot; // inner cone
00120     static const char*          sConeAngle; // outer cone
00121     static const char*          sFog;
00122     static const char*          sDecayType;
00123     static const char*          sDecayStart;
00124     static const char*          sFileName;
00125     static const char*          sEnableNearAttenuation;
00126     static const char*          sNearAttenuationStart;
00127     static const char*          sNearAttenuationEnd;
00128     static const char*          sEnableFarAttenuation;
00129     static const char*          sFarAttenuationStart;
00130     static const char*          sFarAttenuationEnd;
00131     static const char*          sCastShadows;
00132     static const char*          sShadowColor;
00134 
00139     static const ELightType     sDefaultLightType;
00140     static const fbxBool1       sDefaultCastLight;
00141     static const fbxBool1       sDefaultDrawVolumetricLight;
00142     static const fbxBool1       sDefaultDrawGroundProjection;
00143     static const fbxBool1       sDefaultDrawFrontFacingVolumetricLight;
00144     static const fbxDouble3     sDefaultColor;
00145     static const fbxDouble1     sDefaultIntensity;
00146     static const fbxDouble1     sDefaultHotSpot;
00147     static const fbxDouble1     sDefaultConeAngle;
00148     static const fbxDouble1     sDefaultFog;
00149     static const EDecayType     sDefaultDecayType;
00150     static const fbxDouble1     sDefaultDecayStart;
00151     static const fbxString      sDefaultFileName;
00152     static const fbxBool1       sDefaultEnableNearAttenuation;
00153     static const fbxDouble1     sDefaultNearAttenuationStart;
00154     static const fbxDouble1     sDefaultNearAttenuationEnd;
00155     static const fbxBool1       sDefaultEnableFarAttenuation;
00156     static const fbxDouble1     sDefaultFarAttenuationStart;
00157     static const fbxDouble1     sDefaultFarAttenuationEnd;
00158     static const fbxBool1       sDefaultCastShadows;
00159     static const fbxDouble3     sDefaultShadowColor;
00161 
00163     //
00164     // Properties
00165     //
00167 
00172     
00180     KFbxTypedProperty<ELightType>       LightType;
00181 
00189     KFbxTypedProperty<fbxBool1>         CastLight;
00190 
00198     KFbxTypedProperty<fbxBool1>         DrawVolumetricLight;
00199 
00207     KFbxTypedProperty<fbxBool1>         DrawGroundProjection;
00208 
00216     KFbxTypedProperty<fbxBool1>         DrawFrontFacingVolumetricLight;
00217 
00225     KFbxTypedProperty<fbxDouble3>       Color;
00226 
00234     KFbxTypedProperty<fbxDouble1>       Intensity;
00235 
00243     KFbxTypedProperty<fbxDouble1>       HotSpot;
00244 
00252     KFbxTypedProperty<fbxDouble1>       ConeAngle;
00253 
00261     KFbxTypedProperty<fbxDouble1>       Fog;
00262 
00270     KFbxTypedProperty<EDecayType>       DecayType;
00271 
00279     KFbxTypedProperty<fbxDouble1>       DecayStart;
00280 
00288     KFbxTypedProperty<fbxString>        FileName;
00289 
00297     KFbxTypedProperty<fbxBool1>         EnableNearAttenuation;
00298 
00306     KFbxTypedProperty<fbxDouble1>       NearAttenuationStart;
00307 
00315     KFbxTypedProperty<fbxDouble1>       NearAttenuationEnd;
00316 
00324     KFbxTypedProperty<fbxBool1>         EnableFarAttenuation;
00325 
00333     KFbxTypedProperty<fbxDouble1>       FarAttenuationStart;
00334 
00342     KFbxTypedProperty<fbxDouble1>       FarAttenuationEnd;
00343 
00351     KFbxTypedProperty<fbxBool1>         CastShadows;
00352 
00360     KFbxTypedProperty<fbxDouble3>       ShadowColor;
00361     
00363 
00365 //
00366 //  WARNING!
00367 //
00368 //  Anything beyond these lines may not be documented accurately and is 
00369 //  subject to change without notice.
00370 //
00372 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00373 
00374 public:
00375     // Clone
00376     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00377 
00378 protected:
00379     KFbxLight(KFbxSdkManager& pManager, char const* pName);
00380     virtual bool ConstructProperties(bool pForceSet);
00381 
00385     virtual void Init();
00386 
00387     virtual KString     GetTypeName() const;
00388     virtual KStringList GetTypeFlags() const;
00389 
00390 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00391 };
00392 
00393 typedef KFbxLight* HKFbxLight;
00394 
00395 inline EFbxType FbxTypeOf( KFbxLight::ELightType const &pItem )         { return eENUM; }
00396 inline EFbxType FbxTypeOf( KFbxLight::EDecayType const &pItem )         { return eENUM; }
00397 
00398 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00399 
00400 #endif // FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H
00401