00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
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
00102 K_DEPRECATED void SetLightType(ELightType pLightType);
00103
00110 K_DEPRECATED ELightType GetLightType() const;
00111
00118 K_DEPRECATED void SetCastLight(bool pCastLight);
00119
00126 K_DEPRECATED bool GetCastLight() const;
00127
00137 K_DEPRECATED void SetCastShadows(bool pCastShadows);
00138
00148 K_DEPRECATED bool GetCastShadows() const;
00149
00159 K_DEPRECATED void SetShadowColor( KFbxColor& pColor );
00160
00170 K_DEPRECATED KFbxColor GetShadowColor() const;
00171
00175 void SetShadowTexture( KFbxTexture* pTexture );
00176
00180 KFbxTexture* GetShadowTexture() const;
00181
00183
00188
00198 K_DEPRECATED bool SetFileName(char const* pFileName);
00199
00200 #ifdef KARCH_DEV_MACOSX_CFM
00201 K_DEPRECATED bool SetFile(const FSSpec &pMacFileSpec);
00202 K_DEPRECATED bool SetFile(const FSRef &pMacFileRef);
00203 K_DEPRECATED bool SetFile(const CFURLRef &pMacURL);
00204 #endif
00205
00212 K_DEPRECATED char const* GetFileName() const;
00213
00214 #ifdef KARCH_DEV_MACOSX_CFM
00215 bool GetFile(FSSpec &pMacFileSpec) const;
00216 bool GetFile(FSRef &pMacFileRef) const;
00217 bool GetFile(CFURLRef &pMacURL) const;
00218 #endif
00219
00220
00227 K_DEPRECATED void SetDecayType( EDecayType pDecayType );
00228
00235 K_DEPRECATED EDecayType GetDecayType() const;
00236
00243 K_DEPRECATED void SetDecayStart( double pDist );
00244
00251 K_DEPRECATED double GetDecayStart() const;
00252
00259 K_DEPRECATED void SetGroundProjection (bool pEnable);
00260
00267 K_DEPRECATED bool GetGroundProjection() const;
00268
00275 K_DEPRECATED void SetVolumetricProjection(bool pEnable);
00276
00283 K_DEPRECATED bool GetVolumetricProjection() const;
00284
00292 K_DEPRECATED void SetFrontVolumetricProjection(bool pEnable);
00293
00301 K_DEPRECATED bool GetFrontVolumetricProjection() const;
00302
00304
00312
00320 K_DEPRECATED void SetDefaultColor(KFbxColor& pColor);
00321
00330 K_DEPRECATED KFbxColor& GetDefaultColor(KFbxColor& pColor) const;
00331
00339 K_DEPRECATED void SetDefaultIntensity(double pIntensity);
00340
00348 K_DEPRECATED double GetDefaultIntensity() const;
00349
00358 K_DEPRECATED void SetDefaultConeAngle(double pConeAngle);
00359
00368 K_DEPRECATED double GetDefaultConeAngle() const;
00369
00378 K_DEPRECATED void SetDefaultFog(double pFog);
00379
00388 K_DEPRECATED double GetDefaultFog() const;
00389
00391
00396 static const char* sLightType;
00397 static const char* sCastLight;
00398 static const char* sDrawVolumetricLight;
00399 static const char* sDrawGroundProjection;
00400 static const char* sDrawFrontFacingVolumetricLight;
00401 static const char* sColor;
00402 static const char* sIntensity;
00403 static const char* sHotSpot;
00404 static const char* sConeAngle;
00405 static const char* sFog;
00406 static const char* sDecayType;
00407 static const char* sDecayStart;
00408 static const char* sFileName;
00409 static const char* sEnableNearAttenuation;
00410 static const char* sNearAttenuationStart;
00411 static const char* sNearAttenuationEnd;
00412 static const char* sEnableFarAttenuation;
00413 static const char* sFarAttenuationStart;
00414 static const char* sFarAttenuationEnd;
00415 static const char* sCastShadows;
00416 static const char* sShadowColor;
00418
00423 static const ELightType sDefaultLightType;
00424 static const fbxBool1 sDefaultCastLight;
00425 static const fbxBool1 sDefaultDrawVolumetricLight;
00426 static const fbxBool1 sDefaultDrawGroundProjection;
00427 static const fbxBool1 sDefaultDrawFrontFacingVolumetricLight;
00428 static const fbxDouble3 sDefaultColor;
00429 static const fbxDouble1 sDefaultIntensity;
00430 static const fbxDouble1 sDefaultHotSpot;
00431 static const fbxDouble1 sDefaultConeAngle;
00432 static const fbxDouble1 sDefaultFog;
00433 static const EDecayType sDefaultDecayType;
00434 static const fbxDouble1 sDefaultDecayStart;
00435 static const fbxString sDefaultFileName;
00436 static const fbxBool1 sDefaultEnableNearAttenuation;
00437 static const fbxDouble1 sDefaultNearAttenuationStart;
00438 static const fbxDouble1 sDefaultNearAttenuationEnd;
00439 static const fbxBool1 sDefaultEnableFarAttenuation;
00440 static const fbxDouble1 sDefaultFarAttenuationStart;
00441 static const fbxDouble1 sDefaultFarAttenuationEnd;
00442 static const fbxBool1 sDefaultCastShadows;
00443 static const fbxDouble3 sDefaultShadowColor;
00445
00447
00448
00449
00451
00456
00464 KFbxTypedProperty<ELightType> LightType;
00465
00473 KFbxTypedProperty<fbxBool1> CastLight;
00474
00482 KFbxTypedProperty<fbxBool1> DrawVolumetricLight;
00483
00491 KFbxTypedProperty<fbxBool1> DrawGroundProjection;
00492
00500 KFbxTypedProperty<fbxBool1> DrawFrontFacingVolumetricLight;
00501
00509 KFbxTypedProperty<fbxDouble3> Color;
00510
00518 KFbxTypedProperty<fbxDouble1> Intensity;
00519
00527 KFbxTypedProperty<fbxDouble1> HotSpot;
00528
00536 KFbxTypedProperty<fbxDouble1> ConeAngle;
00537
00545 KFbxTypedProperty<fbxDouble1> Fog;
00546
00554 KFbxTypedProperty<EDecayType> DecayType;
00555
00563 KFbxTypedProperty<fbxDouble1> DecayStart;
00564
00572 KFbxTypedProperty<fbxString> FileName;
00573
00581 KFbxTypedProperty<fbxBool1> EnableNearAttenuation;
00582
00590 KFbxTypedProperty<fbxDouble1> NearAttenuationStart;
00591
00599 KFbxTypedProperty<fbxDouble1> NearAttenuationEnd;
00600
00608 KFbxTypedProperty<fbxBool1> EnableFarAttenuation;
00609
00617 KFbxTypedProperty<fbxDouble1> FarAttenuationStart;
00618
00626 KFbxTypedProperty<fbxDouble1> FarAttenuationEnd;
00627
00635 KFbxTypedProperty<fbxBool1> CastShadows;
00636
00644 KFbxTypedProperty<fbxDouble3> ShadowColor;
00645
00647
00649
00650
00651
00652
00653
00654
00656
00657 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00658
00659 public:
00660
00661
00662 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00663
00664 protected:
00665
00666 KFbxLight(KFbxSdkManager& pManager, char const* pName);
00667 virtual ~KFbxLight();
00668
00670 KFbxLight& operator= (KFbxLight const& pLight);
00671
00672 virtual bool ConstructProperties(bool pForceSet);
00673 virtual void Destruct(bool pRecursive, bool pDependents);
00674
00678 virtual void Init();
00679
00680 virtual KString GetTypeName() const;
00681 virtual KStringList GetTypeFlags() const;
00682
00683 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00684
00685 };
00686
00687 typedef KFbxLight* HKFbxLight;
00688
00689 inline EFbxType FbxTypeOf( KFbxLight::ELightType const &pItem ) { return eENUM; }
00690 inline EFbxType FbxTypeOf( KFbxLight::EDecayType const &pItem ) { return eENUM; }
00691
00692 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00693
00694 #endif // FBXFILESDK_KFBXPLUGINS_KFBXLIGHT_H
00695