Public Member Functions | Protected Member Functions

KFbxLight Class Reference

This reference page is linked to from the following overview topics: 2012.2, Supported Scene Elements, Connections, Nodes and the Scene Graph, FBX Nodes, FBX Node Attributes, Lights, List of Python FBX classes.


Search for all occurrences

Detailed Description

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

Examples:

ExportDocument/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayLight.cxx, ViewScene/DrawScene.cxx, ViewScene/GlFunctions.cxx, and ViewScene/GlFunctions.h.

Definition at line 54 of file kfbxlight.h.

#include <kfbxlight.h>

Inheritance diagram for KFbxLight:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

  KFbxLight (KFbxSdkManager &pManager, char const *pName)
virtual bool  ConstructProperties (bool pForceSet)
virtual void  Init ()
virtual KStringList  GetTypeFlags () const

Light Properties

enum   ELightType { ePOINT = 0, eDIRECTIONAL, eSPOT }
 

Light types.

More...
enum   EDecayType { eNONE = 0, eLINEAR, eQUADRATIC, eCUBIC }
 

Decay types.

More...
void  SetShadowTexture (KFbxTexture *pTexture)
  Set the shadow texture for the light.
KFbxTexture GetShadowTexture () 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
  Property Names.
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 const ELightType  sDefaultLightType
static const fbxBool1  sDefaultCastLight
static const fbxBool1  sDefaultDrawVolumetricLight
static const fbxBool1  sDefaultDrawGroundProjection
static const fbxBool1  sDefaultDrawFrontFacingVolumetricLight
static const fbxDouble3  sDefaultColor
  Property Default Values.
static const fbxDouble1  sDefaultIntensity
static const fbxDouble1  sDefaultHotSpot
static const fbxDouble1  sDefaultConeAngle
static const fbxDouble1  sDefaultFog
static const EDecayType  sDefaultDecayType
static const fbxDouble1  sDefaultDecayStart
static const fbxString  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< ELightType LightType
  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 light 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< EDecayType DecayType
  This property handles the decay type.
KFbxTypedProperty< fbxDouble1 DecayStart
  This property handles the decay start distance.
KFbxTypedProperty< fbxString FileName
  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.

Member Enumeration Documentation

enum ELightType

Light types.

  • ePOINT
  • eDIRECTIONAL
  • eSPOT
Enumerator:
ePOINT 
eDIRECTIONAL 
eSPOT 

Definition at line 73 of file kfbxlight.h.

enum EDecayType

Decay types.

Used for setting the attenuation of the light.

  • eNONE No decay. The light's intensity will not diminish with distance.
  • eLINEAR Linear decay. The light's intensity will diminish linearly with the distance from the light.
  • eQUADRATIC Quadratic decay. The light's intensity will diminish with the squared distance from the light. This is the most physically accurate decay rate.
  • eCUBIC Cubic decay. The light's intensity will diminish with the cubed distance from the light.
Enumerator:
eNONE 
eLINEAR 
eQUADRATIC 
eCUBIC 

Definition at line 87 of file kfbxlight.h.


Constructor & Destructor Documentation

KFbxLight ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

virtual EAttributeType GetAttributeType ( ) const [virtual]

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

Reimplemented from KFbxNodeAttribute.

void SetShadowTexture ( KFbxTexture pTexture )

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, or NULL if the shadow texture has not been set.
virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]
virtual void Init ( ) [protected, virtual]
virtual KStringList GetTypeFlags ( ) const [protected, virtual]

Member Data Documentation

const char* sLightType [static]

Definition at line 112 of file kfbxlight.h.

const char* sCastLight [static]

Definition at line 113 of file kfbxlight.h.

const char* sDrawVolumetricLight [static]

Definition at line 114 of file kfbxlight.h.

const char* sDrawGroundProjection [static]

Definition at line 115 of file kfbxlight.h.

const char* sDrawFrontFacingVolumetricLight [static]

Definition at line 116 of file kfbxlight.h.

const char* sColor [static]

Property Names.

Reimplemented from KFbxNodeAttribute.

Definition at line 117 of file kfbxlight.h.

const char* sIntensity [static]

Definition at line 118 of file kfbxlight.h.

const char* sHotSpot [static]

Definition at line 119 of file kfbxlight.h.

const char* sConeAngle [static]

Definition at line 120 of file kfbxlight.h.

const char* sFog [static]

Definition at line 121 of file kfbxlight.h.

const char* sDecayType [static]

Definition at line 122 of file kfbxlight.h.

const char* sDecayStart [static]

Definition at line 123 of file kfbxlight.h.

const char* sFileName [static]

Definition at line 124 of file kfbxlight.h.

const char* sEnableNearAttenuation [static]

Definition at line 125 of file kfbxlight.h.

const char* sNearAttenuationStart [static]

Definition at line 126 of file kfbxlight.h.

const char* sNearAttenuationEnd [static]

Definition at line 127 of file kfbxlight.h.

const char* sEnableFarAttenuation [static]

Definition at line 128 of file kfbxlight.h.

const char* sFarAttenuationStart [static]

Definition at line 129 of file kfbxlight.h.

const char* sFarAttenuationEnd [static]

Definition at line 130 of file kfbxlight.h.

const char* sCastShadows [static]

Definition at line 131 of file kfbxlight.h.

const char* sShadowColor [static]

Definition at line 132 of file kfbxlight.h.

const ELightType sDefaultLightType [static]

Definition at line 139 of file kfbxlight.h.

const fbxBool1 sDefaultCastLight [static]

Definition at line 140 of file kfbxlight.h.

Definition at line 141 of file kfbxlight.h.

Definition at line 142 of file kfbxlight.h.

Definition at line 143 of file kfbxlight.h.

const fbxDouble3 sDefaultColor [static]

Property Default Values.

Reimplemented from KFbxNodeAttribute.

Definition at line 144 of file kfbxlight.h.

const fbxDouble1 sDefaultIntensity [static]

Definition at line 145 of file kfbxlight.h.

const fbxDouble1 sDefaultHotSpot [static]

Definition at line 146 of file kfbxlight.h.

const fbxDouble1 sDefaultConeAngle [static]

Definition at line 147 of file kfbxlight.h.

const fbxDouble1 sDefaultFog [static]

Definition at line 148 of file kfbxlight.h.

const EDecayType sDefaultDecayType [static]

Definition at line 149 of file kfbxlight.h.

Definition at line 150 of file kfbxlight.h.

const fbxString sDefaultFileName [static]

Definition at line 151 of file kfbxlight.h.

Definition at line 152 of file kfbxlight.h.

Definition at line 153 of file kfbxlight.h.

Definition at line 154 of file kfbxlight.h.

Definition at line 155 of file kfbxlight.h.

Definition at line 156 of file kfbxlight.h.

Definition at line 157 of file kfbxlight.h.

const fbxBool1 sDefaultCastShadows [static]

Definition at line 158 of file kfbxlight.h.

Definition at line 159 of file kfbxlight.h.

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

Examples:
ExportDocument/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayLight.cxx, ViewScene/DrawScene.cxx, and ViewScene/GlFunctions.cxx.

Definition at line 180 of file kfbxlight.h.

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

Examples:
ExportScene04/main.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 189 of file kfbxlight.h.

This property handles the draw volumetric light flag.

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

Default value is true

Examples:
ExportScene04/main.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 198 of file kfbxlight.h.

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

Examples:
ExportScene04/main.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 207 of file kfbxlight.h.

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

Examples:
ExportScene04/main.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 216 of file kfbxlight.h.

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 from KFbxNodeAttribute.

Examples:
ExportDocument/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayLight.cxx, and ViewScene/DrawScene.cxx.

Definition at line 225 of file kfbxlight.h.

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

Examples:
ExportDocument/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 234 of file kfbxlight.h.

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

Examples:
ExportDocument/main.cxx.

Definition at line 243 of file kfbxlight.h.

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

Examples:
ExportDocument/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayLight.cxx, and ViewScene/DrawScene.cxx.

Definition at line 252 of file kfbxlight.h.

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

Examples:
ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 261 of file kfbxlight.h.

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 line 270 of file kfbxlight.h.

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 line 279 of file kfbxlight.h.

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 ""

Examples:
ExportScene04/main.cxx, and ImportScene/DisplayLight.cxx.

Definition at line 288 of file kfbxlight.h.

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 line 297 of file kfbxlight.h.

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 line 306 of file kfbxlight.h.

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 line 315 of file kfbxlight.h.

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 line 324 of file kfbxlight.h.

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 line 333 of file kfbxlight.h.

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 line 342 of file kfbxlight.h.

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 line 351 of file kfbxlight.h.

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 line 360 of file kfbxlight.h.


The documentation for this class was generated from the following file:

KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight
KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight KFbxLight