KFbxLight
#include<kfbxlight.h>

Inheritance diagram for KFbxLight:

Inheritance graph
[legend]

List of all members.

Detailed Description

This node attribute contains methods for accessing the properties of a light.

Definition at line59of filekfbxlight.h.


Light Properties

enum ELightType
 Light types.More...
enum EDecayType
 Decay types.More...
K_DEPRECATED void SetLightType(ELightTypepLightType)
 Set the light type.
K_DEPRECATEDELightType GetLightType() const
 Get the light type.
K_DEPRECATED void SetCastLight(bool pCastLight)
 Activate or disable the light.
K_DEPRECATED bool GetCastLight() const
 Get the light state.
K_DEPRECATED void SetCastShadows(bool pCastShadows)
 Set the shadow state for the light.
K_DEPRECATED bool GetCastShadows() const
 Get the shadow state for the light.
K_DEPRECATED void SetShadowColor(KFbxColor&pColor)
 Set the shadow color for the light.
K_DEPRECATEDKFbxColor GetShadowColor() const
 Get the shadow color for the light.
void SetShadowTexture(KFbxTexture*pTexture)
 Set the shadow texture for the light.
KFbxTextureGetShadowTexture() const
 Get the light state.

Light Property Names

static const char * sLightType
static const char * sCastLight
static const char * sDrawVolumetricLight
static const char * sDrawGroundProjection
static const char * sDrawFrontFacingVolumetricLight
static const char * sColor
static const char * sIntensity
static const char * sHotSpot
static const char * sConeAngle
static const char * sFog
static const char * sDecayType
static const char * sDecayStart
static const char * sFileName
static const char * sEnableNearAttenuation
static const char * sNearAttenuationStart
static const char * sNearAttenuationEnd
static const char * sEnableFarAttenuation
static const char * sFarAttenuationStart
static const char * sFarAttenuationEnd
static const char * sCastShadows
static const char * sShadowColor

Light Property Default Values

static constELightType sDefaultLightType
static const fbxBool1 sDefaultCastLight
static const fbxBool1 sDefaultDrawVolumetricLight
static const fbxBool1 sDefaultDrawGroundProjection
static const fbxBool1 sDefaultDrawFrontFacingVolumetricLight
static const fbxDouble3 sDefaultColor
static const fbxDouble1 sDefaultIntensity
static const fbxDouble1 sDefaultHotSpot
static const fbxDouble1 sDefaultConeAngle
static const fbxDouble1 sDefaultFog
static constEDecayType sDefaultDecayType
static const fbxDouble1 sDefaultDecayStart
static constfbxString sDefaultFileName
static const fbxBool1 sDefaultEnableNearAttenuation
static const fbxDouble1 sDefaultNearAttenuationStart
static const fbxDouble1 sDefaultNearAttenuationEnd
static const fbxBool1 sDefaultEnableFarAttenuation
static const fbxDouble1 sDefaultFarAttenuationStart
static const fbxDouble1 sDefaultFarAttenuationEnd
static const fbxBool1 sDefaultCastShadows
static const fbxDouble3 sDefaultShadowColor

Properties

KFbxTypedProperty<ELightTypeLightType
 This property handles the light type.
KFbxTypedProperty<fbxBool1> CastLight
 This property handles the cast light on object flag.
KFbxTypedProperty<fbxBool1> DrawVolumetricLight
 This property handles the draw volumetric ligtht flag.
KFbxTypedProperty<fbxBool1> DrawGroundProjection
 This property handles the draw ground projection flag.
KFbxTypedProperty<fbxBool1> DrawFrontFacingVolumetricLight
 This property handles the draw facing volumetric projection flag.
KFbxTypedProperty<fbxDouble3> Color
 This property handles the light color.
KFbxTypedProperty<fbxDouble1> Intensity
 This property handles the light intensity.
KFbxTypedProperty<fbxDouble1> HotSpot
 This property handles the light inner cone angle (in degrees).
KFbxTypedProperty<fbxDouble1> ConeAngle
 This property handles the light outer cone angle (in degrees).
KFbxTypedProperty<fbxDouble1> Fog
 This property handles the light fog intensity.
KFbxTypedProperty<EDecayTypeDecayType
 This property handles the decay type.
KFbxTypedProperty<fbxDouble1> DecayStart
 This property handles the decay start distance.
KFbxTypedProperty<fbxStringFileName
 This property handles the gobo file name.
KFbxTypedProperty<fbxBool1> EnableNearAttenuation
 This property handles the enable near attenuation flag.
KFbxTypedProperty<fbxDouble1> NearAttenuationStart
 This property handles the near attenuation start distance.
KFbxTypedProperty<fbxDouble1> NearAttenuationEnd
 This property handles the near end attenuation.
KFbxTypedProperty<fbxBool1> EnableFarAttenuation
 This property handles the enable far attenuation flag.
KFbxTypedProperty<fbxDouble1> FarAttenuationStart
 This property handles the far attenuation start distance.
KFbxTypedProperty<fbxDouble1> FarAttenuationEnd
 This property handles the attenuation end distance.
KFbxTypedProperty<fbxBool1> CastShadows
 This property handles the cast shadow flag.
KFbxTypedProperty<fbxDouble3> ShadowColor
 This property handles the shadow color.

Gobo properties

K_DEPRECATED bool SetFileName(char const *pFileName)
 Set the associated gobo file.
K_DEPRECATED char const * GetFileName() const
 Get the associated gobo file path.
K_DEPRECATED void SetDecayType(EDecayTypepDecayType)
 Sets the decay type.
K_DEPRECATEDEDecayType GetDecayType() const
 Gets the decay type.
K_DEPRECATED void SetDecayStart(double pDist)
 Sets the distance at which the light's intensity will decay.
K_DEPRECATED double GetDecayStart() const
 Gets the distance at which the light instensity will decay.
K_DEPRECATED void SetGroundProjection(bool pEnable)
 Enable gobo ground projection.
K_DEPRECATED bool GetGroundProjection() const
 Get gobo ground projection flag.
K_DEPRECATED void SetVolumetricProjection(bool pEnable)
 Enable gobo volumetric light projection.
K_DEPRECATED bool GetVolumetricProjection() const
 Get gobo volumetric light projection flag.
K_DEPRECATED void SetFrontVolumetricProjection(bool pEnable)
 Enable gobo front volumetric projection.
K_DEPRECATED bool GetFrontVolumetricProjection() const
 Get gobo front volumetric light projection flag.

Default Animation Values

This set of functions provide direct access to default animation values specific to a light.

The default animation values are found in the default take node of the associated node. These functions only work if the light has been associated with a node.

K_DEPRECATED void SetDefaultColor(KFbxColor&pColor)
 Set default color.
K_DEPRECATEDKFbxColorGetDefaultColor(KFbxColor&pColor) const
 Get default color.
K_DEPRECATED void SetDefaultIntensity(double pIntensity)
 Set default intensity.
K_DEPRECATED double GetDefaultIntensity() const
 Get default intensity.
K_DEPRECATED void SetDefaultConeAngle(double pConeAngle)
 Set default cone angle in degrees.
K_DEPRECATED double GetDefaultConeAngle() const
 Get default cone angle in degrees.
K_DEPRECATED void SetDefaultFog(double pFog)
 Set default fog.
K_DEPRECATED double GetDefaultFog() const
 Get default fog.

Public Member Functions

virtual EAttributeType GetAttributeType() const
 Return the type of node attribute which is EAttributeType::eLIGHT.

Member Enumeration Documentation

Light types.

  • ePOINT
  • eDIRECTIONAL
  • eSPOT

Definition at line78of filekfbxlight.h.

Decay types.

Used for setting the attenuation of the light.

  • eNONENo decay. The light's intensity will not diminish with distance.
  • eLINEARLinear decay. The light's intensity will diminish linearly with the distance from the light.
  • eQUADRATICQuadratic decay. The light's intensity will diminish with the squared distance from the light. This is the most physically accurate decay rate.
  • eCUBICCubic decay. The light's intensity will diminish with the cubed distance from the light.

Definition at line92of filekfbxlight.h.

Member Function Documentation

virtual EAttributeType GetAttributeType( ) const[virtual]

Return the type of node attribute which is EAttributeType::eLIGHT.

Reimplemented fromKFbxNodeAttribute.

K_DEPRECATED void SetLightType(ELightType pLightType ) 

Set the light type.

Parameters:
pLightType The light type.
Remarks:
This function is deprecated. Use property LightType.Set(pLightType) instead.

K_DEPRECATEDELightTypeGetLightType( ) const

Get the light type.

Returns:
The current light type.
Remarks:
This function is deprecated. Use property LightType.Get() instead.

K_DEPRECATED void SetCastLight(bool pCastLight ) 

Activate or disable the light.

Parameters:
pCastLight Set totrueto enable the light.
Remarks:
This function is deprecated. Use property CastLight.Set(pCastLight) instead.

K_DEPRECATED bool GetCastLight( ) const

Get the light state.

Returns:
trueif the light is currently active.
Remarks:
This function is deprecated. Use property CastLight.Get() instead.

K_DEPRECATED void SetCastShadows(bool pCastShadows ) 

Set the shadow state for the light.

Parameters:
pCastShadows Set totrueto have the light cast shadows. Activate or de-activate the shadow casting.
pCastShadows Iftruethe casting is active.
Remarks:
This function is deprecated. Use property CastShadows.Set(pCastShadows) instead.

K_DEPRECATED bool GetCastShadows( ) const

Get the shadow state for the light.

Returns:
trueif the light is currently casting shadows. Get shadow casting state.

trueif shadow casting is active.

Remarks:
This function is deprecated. Use property CastShadows.Get() instead.

K_DEPRECATED void SetShadowColor(KFbxColorpColor ) 

Set the shadow color for the light.

Parameters:
pColor The shadow color for the light expressed as kFbxColor. Set Shadow Color.
pColor Shadow color.
Remarks:
This function is deprecated. Use property ShadowColor.Set(pShadowColor) instead.

K_DEPRECATEDKFbxColorGetShadowColor( ) const

Get the shadow color for the light.

Returns:
The shadow color of the light expressed as kFbxColor. Get Shadow Color.

Shadow Color.

Remarks:
This function is deprecated. Use property ShadowColor.Get() instead.

void SetShadowTexture(KFbxTexturepTexture ) 

Set the shadow texture for the light.

Parameters:
pTexture The texture cast by the light shadow.

KFbxTexture* GetShadowTexture( ) const

Get the light state.

Returns:
Pointer to the texture cast by the light shadow, orNULLif the shadow texture has not been set.

K_DEPRECATED bool SetFileName(char const * pFileName ) 

Set the associated gobo file.

Parameters:
pFileName The path of the gobo file.
Returns:
falseif the pointer is null.
Remarks:
The gobo file name must be valid. In addition, the gobo file must be an 8 bit grayscale TIFF image file with height and width dimensions must equal a power of two, and it cannot exceed 256 pixels.

This function is deprecated. Use property FileName.Set() instead.

K_DEPRECATED char const* GetFileName( ) const

Get the associated gobo file path.

Returns:
The associated gobo file path, or an empty string if the gobo file has not been set (seeKFbxLight::SetFileName())
Remarks:
This function is deprecated. Use property FileName.Get() instead.

K_DEPRECATED void SetDecayType(EDecayType pDecayType ) 

Sets the decay type.

Parameters:
pDecayType The decay type
Remarks:
This function is deprecated. Use property DecayType.Set(pDecayType) instead.

K_DEPRECATEDEDecayTypeGetDecayType( ) const

Gets the decay type.

Returns:
The decay type
Remarks:
This function is deprecated. Use property DecayType.Get() instead.

K_DEPRECATED void SetDecayStart(double pDist ) 

Sets the distance at which the light's intensity will decay.

Parameters:
pDist The distance
Remarks:
This function is deprecated. Use property DecayStart.Set(pDist) instead.

K_DEPRECATED double GetDecayStart( ) const

Gets the distance at which the light instensity will decay.

Returns:
The distance
Remarks:
This function is deprecated. Use property DecayStart.Get() instead.

K_DEPRECATED void SetGroundProjection(bool pEnable ) 

Enable gobo ground projection.

Parameters:
pEnable Set totrueto have the gobo project on the ground/floor.
Remarks:
This function is deprecated. Use property DrawGroundProjection.Set(pEnable) instead.

K_DEPRECATED bool GetGroundProjection( ) const

Get gobo ground projection flag.

Returns:
trueif gobo ground projection is enabled.
Remarks:
This function is deprecated. Use property DrawGroundProjection.Get() instead.

K_DEPRECATED void SetVolumetricProjection(bool pEnable ) 

Enable gobo volumetric light projection.

Parameters:
pEnable Set totrueto enable volumetric lighting projection.
Remarks:
This function is deprecated. Use property DrawVolumetricLight.Set(pEnable) instead.

K_DEPRECATED bool GetVolumetricProjection( ) const

Get gobo volumetric light projection flag.

Returns:
trueif gobo volumetric light projection is enabled.
Remarks:
This function is deprecated. Use property DrawVolumetricLight.Get() instead.

K_DEPRECATED void SetFrontVolumetricProjection(bool pEnable ) 

Enable gobo front volumetric projection.

Parameters:
pEnable Set totrueto enable front volumetric lighting projection.
Remarks:
This option is not supported in MotionBuilder.

This function is deprecated. Use property DrawFrontFacingVolumetricLight.Set(pEnable) instead.

K_DEPRECATED bool GetFrontVolumetricProjection( ) const

Get gobo front volumetric light projection flag.

Returns:
trueif gobo front volumetric light projection is enabled.
Remarks:
This option is not supported in MotionBuilder.

This function is deprecated. Use property DrawFrontFacingVolumetricLight.Get() instead.

K_DEPRECATED void SetDefaultColor(KFbxColorpColor ) 

Set default color.

Parameters:
pColor The color of the light.
Remarks:
The default value is white.

This function is deprecated. Use property Color.Set(pColor) instead.

K_DEPRECATEDKFbxColor&GetDefaultColor(KFbxColorpColor ) const

Get default color.

Parameters:
pColor The color of the light.
Returns:
Input parameter filled with appropriate data.
Remarks:
The default value is white.

This function is deprecated. Use property Color.Get() instead.

K_DEPRECATED void SetDefaultIntensity(double pIntensity ) 

Set default intensity.

Parameters:
pIntensity The intensity value of the light.
Remarks:
The intensity range is from 0 to 200, where 200 is full intensity. The default value is 100.

This function is deprecated. Use property Intensity.Set(pIntensity) instead.

K_DEPRECATED double GetDefaultIntensity( ) const

Get default intensity.

Returns:
The intensity value of the light.
Remarks:
The intensity range is from 0 to 200, where 200 is full intensity. The default value is 100.

This function is deprecated. Use property Intensity.Get() instead.

K_DEPRECATED void SetDefaultConeAngle(double pConeAngle ) 

Set default cone angle in degrees.

The cone angle is the outer cone. The inner cone is set using the HotSpot property.

Parameters:
pConeAngle The cone angle value of the light.
Remarks:
The cone angle has range is from 0 to 160 degrees. The default value is 45 degrees. This function has no effect if the light type is not set to eSPOT.

This function is deprecated. Use property ConeAngle.Set(pConeAngle) instead.

K_DEPRECATED double GetDefaultConeAngle( ) const

Get default cone angle in degrees.

Returns:
The cone angle value of the light.
Remarks:
The cone angle has range is from 0 to 160 degrees. The default value is 45 degrees. This function has no effect if the light type is not set to eSPOT.

This function is deprecated. Use property ConeAngle.Get() instead.

K_DEPRECATED void SetDefaultFog(double pFog ) 

Set default fog.

Parameters:
pFog The fog value of the light.
Remarks:
This fog range is from 0 to 200, where 200 is full fog opacity. The default value is 50. This function has no effect if the light type is not set to eSPOT.

This function is deprecated. Use property Fog.Set(pFog) instead.

K_DEPRECATED double GetDefaultFog( ) const

Get default fog.

Returns:
The fog value of the light.
Remarks:
This fog range is from 0 to 200, where 200 is full fog opacity. The default value is 50. This function has no effect if the light type is not set to eSPOT.

This function is deprecated. Use property Fog.Get() instead.

Member Data Documentation

KFbxTypedProperty<ELightType>LightType

This property handles the light type.

To access this property do: LightType.Get(). To set this property do: LightType.Set(ELightType).

Default value is ePOINT

Definition at line468of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>CastLight

This property handles the cast light on object flag.

To access this property do: CastLight.Get(). To set this property do: CastLight.Set(fbxBool1).

Default value is true

Definition at line477of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>DrawVolumetricLight

This property handles the draw volumetric ligtht flag.

To access this property do: DrawVolumetricLight.Get(). To set this property do: DrawVolumetricLight.Set(fbxBool1).

Default value is true

Definition at line486of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>DrawGroundProjection

This property handles the draw ground projection flag.

To access this property do: DrawGroundProjection.Get(). To set this property do: DrawGroundProjection.Set(fbxBool1).

Default value is true

Definition at line495of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>DrawFrontFacingVolumetricLight

This property handles the draw facing volumetric projection flag.

To access this property do: DrawFrontFacingVolumetricLight.Get(). To set this property do: DrawFrontFacingVolumetricLight.Set(fbxBool1).

Default value is false

Definition at line504of filekfbxlight.h.

KFbxTypedProperty<fbxDouble3>Color

This property handles the light color.

To access this property do: Color.Get(). To set this property do: Color.Set(fbxDouble3).

Default value is (1.0, 1.0, 1.0)

Reimplemented fromKFbxNodeAttribute.

Definition at line513of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>Intensity

This property handles the light intensity.

To access this property do: Intensity.Get(). To set this property do: Intensity.Set(fbxDouble1).

Default value is 100.0

Definition at line522of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>HotSpot

This property handles the light inner cone angle (in degrees).

Also know as the HotSpot!

To access this property do: HotSpot.Get(). To set this property do: HotSpot.Set(fbxDouble1).

Default value is 45.0

Definition at line531of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>ConeAngle

This property handles the light outer cone angle (in degrees).

Also known as the Falloff

To access this property do: ConeAngle.Get(). To set this property do: ConeAngle.Set(fbxDouble1).

Default value is 45.0

Definition at line540of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>Fog

This property handles the light fog intensity.

To access this property do: Fog.Get(). To set this property do: Fog.Set(fbxDouble1).

Default value is 50.0

Definition at line549of filekfbxlight.h.

KFbxTypedProperty<EDecayType>DecayType

This property handles the decay type.

To access this property do: DecayType.Get(). To set this property do: DecayType.Set(EDecayType).

Default value is eNONE

Definition at line558of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>DecayStart

This property handles the decay start distance.

To access this property do: DecayStart.Get(). To set this property do: DecayStart.Set(fbxDouble1).

Default value is 0.0

Definition at line567of filekfbxlight.h.

KFbxTypedProperty<fbxString>FileName

This property handles the gobo file name.

To access this property do: FileName.Get(). To set this property do: FileName.Set(fbxString).

Default value is ""

Definition at line576of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>EnableNearAttenuation

This property handles the enable near attenuation flag.

To access this property do: EnableNearAttenuation.Get(). To set this property do: EnableNearAttenuation.Set(fbxBool1).

Default value is false

Definition at line585of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>NearAttenuationStart

This property handles the near attenuation start distance.

To access this property do: NearAttenuationStart.Get(). To set this property do: NearAttenuationStart.Set(fbxDouble1).

Default value is 0.0

Definition at line594of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>NearAttenuationEnd

This property handles the near end attenuation.

To access this property do: NearAttenuationEnd.Get(). To set this property do: NearAttenuationEnd.Set(fbxDouble1).

Default value is 0.0

Definition at line603of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>EnableFarAttenuation

This property handles the enable far attenuation flag.

To access this property do: EnableFarAttenuation.Get(). To set this property do: EnableFarAttenuation.Set(fbxBool1).

Default value is false

Definition at line612of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>FarAttenuationStart

This property handles the far attenuation start distance.

To access this property do: FarAttenuationStart.Get(). To set this property do: FarAttenuationStart.Set(fbxDouble1).

Default value is 0.0

Definition at line621of filekfbxlight.h.

KFbxTypedProperty<fbxDouble1>FarAttenuationEnd

This property handles the attenuation end distance.

To access this property do: FarAttenuationEnd.Get(). To set this property do: FarAttenuationEnd.Set(fbxDouble1).

Default value is 0.0

Definition at line630of filekfbxlight.h.

KFbxTypedProperty<fbxBool1>CastShadows

This property handles the cast shadow flag.

To access this property do: CastShadows.Get(). To set this property do: CastShadows.Set(fbxBool1).

Default value is false

Definition at line639of filekfbxlight.h.

KFbxTypedProperty<fbxDouble3>ShadowColor

This property handles the shadow color.

To access this property do: ShadowColor.Get(). To set this property do: ShadowColor.Set(fbxDouble3).

Default value is (0.0, 0.0, 0.0)

Definition at line648of filekfbxlight.h.