kfbxlight.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_LIGHT_H_
00005 #define _FBXSDK_LIGHT_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 <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044 #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <kaydara.h>
00048
00049 #include <kfbxplugins/kfbxnodeattribute.h>
00050 #include <fbxfilesdk_nsbegin.h>
00051
00052 class KFbxColor;
00053 class KFbxSdkManager;
00054 class KFbxTexture;
00055 class KFbxLight_internal;
00056
00060 class KFBX_DLL KFbxLight : public KFbxNodeAttribute
00061 {
00062 KFBXOBJECT_DECLARE(KFbxLight);
00063
00064 public:
00065
00067 virtual EAttributeType GetAttributeType() const;
00068
00073 static const char* sDecayType;
00074 static const char* sDecayStart;
00075 static const char* sEnableNearAttenuation;
00076 static const char* sNearAttenuationStart;
00077 static const char* sNearAttenuationEnd;
00078 static const char* sEnableFarAttenuation;
00079 static const char* sFarAttenuationStart;
00080 static const char* sFarAttenuationEnd;
00081 static const char* sCastShadows;
00082 static const char* sShadowColor;
00083
00085
00090
00096 typedef enum
00097 {
00098 ePOINT,
00099 eDIRECTIONAL,
00100 eSPOT
00101 } ELightType;
00102
00110 typedef enum
00111 {
00112 eNONE = 0,
00113 eLINEAR,
00114 eQUADRATIC,
00115 eCUBIC
00116 } EDecayType;
00117
00121 void SetLightType(ELightType pLightType);
00122
00126 ELightType GetLightType() const;
00127
00131 void SetCastLight(bool pCastLight);
00132
00136 bool GetCastLight() const;
00137
00141 void SetCastShadows(bool pCastShadows);
00142
00146 bool GetCastShadows() const;
00147
00151 void SetShadowColor( KFbxColor& pColor );
00152
00156 KFbxColor GetShadowColor() const;
00157
00161 void SetShadowTexture( KFbxTexture* pTexture );
00162
00166 KFbxTexture* GetShadowTexture() const;
00167
00169
00174
00181 bool SetFileName(char* pFileName);
00182
00183 #ifdef KARCH_DEV_MACOSX_CFM
00184 bool SetFile(const FSSpec &pMacFileSpec);
00185 bool SetFile(const FSRef &pMacFileRef);
00186 bool SetFile(const CFURLRef &pMacURL);
00187 #endif
00188
00192 char const* GetFileName() const;
00193
00194 #ifdef KARCH_DEV_MACOSX_CFM
00195 bool GetFile(FSSpec &pMacFileSpec) const;
00196 bool GetFile(FSRef &pMacFileRef) const;
00197 bool GetFile(CFURLRef &pMacURL) const;
00198 #endif
00199
00200
00204 void SetDecayType( EDecayType pDecayType );
00205
00209 EDecayType GetDecayType() const;
00210
00214 void SetDecayStart( double pDist );
00215
00219 double GetDecayStart() const;
00220
00224 void SetGroundProjection (bool pEnable);
00225
00229 bool GetGroundProjection() const;
00230
00234 void SetVolumetricProjection(bool pEnable);
00235
00239 bool GetVolumetricProjection() const;
00240
00245 void SetFrontVolumetricProjection(bool pEnable);
00246
00251 bool GetFrontVolumetricProjection() const;
00252
00254
00262
00267 void SetDefaultColor(KFbxColor& pColor);
00268
00274 KFbxColor& GetDefaultColor(KFbxColor& pColor) const;
00275
00280 void SetDefaultIntensity(double pIntensity);
00281
00286 double GetDefaultIntensity() const;
00287
00293 void SetDefaultConeAngle(double pConeAngle);
00294
00300 double GetDefaultConeAngle() const;
00301
00307 void SetDefaultFog(double pFog);
00308
00314 double GetDefaultFog() const;
00315
00317
00318
00320
00321
00322
00323
00324
00325
00327
00328 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00329
00330 public:
00331
00332 virtual KObject* GetFbxObject_internal();
00333 virtual KObject const* GetFbxObject_internal() const;
00334
00335
00336 virtual KFbxObject* Clone(KFbxObject::ECloneType pCloneType) const;
00337
00338 protected:
00339 static char const* GetNamePrefix() { return 0; }
00340
00341 KFbxLight(KFbxSdkManager& pManager, char const* pName);
00342 virtual ~KFbxLight();
00343
00345 KFbxLight& operator= (KFbxLight const& pLight);
00346
00347 virtual void Destruct(bool pRecursive, bool pDependents);
00348
00352 virtual void AddChannels(KFbxTakeNode *pTakeNode);
00353
00357 virtual void RemoveChannels(KFbxTakeNode *pTakeNode);
00358
00362 virtual void Init();
00363
00364 virtual bool FbxPlugNotify(KFbxPlugEvent const &pEvent);
00365
00369 KFbxLight_internal* mPH;
00370
00371 virtual KString GetTypeName() const;
00372 virtual KStringList GetTypeFlags() const;
00373
00374 KString mFileName;
00375
00376 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00377
00378 };
00379
00380 typedef KFbxLight* HKFbxLight;
00381
00382 #include <fbxfilesdk_nsend.h>
00383
00384 #endif // #ifndef _FBXSDK_LIGHT_H_
00385
00386
00387