KFbxGlobalLightSettings
#include<kfbxgloballightsettings.h>

List of all members.

Detailed Description

This class contains functions for accessing global light settings.

Definition at line63of filekfbxgloballightsettings.h.


Fog Option

enum EFogMode
 Fog types.More...
void SetFogEnable(bool pEnable)
 Enable or disable the fog.
bool GetFogEnable()
 Get the current state of the fog option.
void SetFogColor(KFbxColorpColor)
 Set the fog color.
KFbxColor GetFogColor()
 Get the fog color.
void SetFogMode(EFogModepMode)
 Set the fog mode.
EFogMode GetFogMode()
 Get the fog mode.
void SetFogDensity(double pDensity)
 Set the fog density.
double GetFogDensity()
 Get the fog density.
void SetFogStart(double pStart)
 Set the distance from the view where the fog starts.
double GetFogStart()
 Get the distance from the view where the fog starts.
void SetFogEnd(double pEnd)
 Set the distance from the view where the fog ends.
double GetFogEnd()
 Get the distance from the view where the fog ends.

Error Management

enum EError
 Error identification.More...
KErrorGetError()
 Retrieve error object.
EError GetLastErrorID() const
 Get last error code.
const char * GetLastErrorString() const
 Get last error string.

Ambient Color

void SetAmbientColor(KFbxColorpAmbientColor)
 Set ambient color.
KFbxColor GetAmbientColor()
 Get ambient color.

Shadow Planes

The functions in this section are supported by FiLMBOX 2.7 and previous versions only.

FiLMBOX 3.0 supports shadow planes within a specific shader, which is not supported by the FBX SDK.

void SetShadowEnable(bool pShadowEnable)
 Enable or disable the shadow planes display.
bool GetShadowEnable()
 Get the current state of the ShadowEnable flag.
void SetShadowIntensity(double pShadowIntensity)
 Set the shadow intensity applied to all shadow planes.
double GetShadowIntensity()
 Get the shadow intensity applied to all shadow planes.
int GetShadowPlaneCount()
 Get the number of shadow planes.
KFbxShadowPlane * GetShadowPlane(int pIndex)
 Get a shadow plane.
void AddShadowPlane(KFbxShadowPlane pShadowPlane)
 Add a shadow plane.
void RemoveAllShadowPlanes()
 Remove all shadow planes.

Public Member Functions

void RestoreDefaultSettings()
 Restore default settings.
constKFbxGlobalLightSettingsoperator=(constKFbxGlobalLightSettings&pGlobalLightSettings)
 Assignment operator.

Member Enumeration Documentation

Fog types.

  • eLINEAR
    • eEXPONENTIAL
    • eSQUAREROOT_EXPONENTIAL

Definition at line118of filekfbxgloballightsettings.h.

enumEError

Error identification.

  • eINDEX_OUT_OF_RANGE
  • eERROR_COUNT

Definition at line248of filekfbxgloballightsettings.h.

Member Function Documentation

void SetAmbientColor(KFbxColor pAmbientColor ) 

Set ambient color.

Parameters:
pAmbientColor The ambient color to set.
Remarks:
Only the RGB channels are used.

KFbxColorGetAmbientColor( ) 

Get ambient color.

Returns:
The ambient color.

void SetFogEnable(bool pEnable ) 

Enable or disable the fog.

Parameters:
pEnable Set totrueto enable the fog option.falsedisables the fog option.

bool GetFogEnable( ) 

Get the current state of the fog option.

Returns:
trueif fog is enabled,falseotherwise.

void SetFogColor(KFbxColor pColor ) 

Set the fog color.

Parameters:
pColor The fog color.
Remarks:
Only the RGB channels are used.

KFbxColorGetFogColor( ) 

Get the fog color.

Returns:
The fog color.
Remarks:
Only the RGB channels are used.

void SetFogMode(EFogMode pMode ) 

Set the fog mode.

Parameters:
pMode The fog type.

EFogModeGetFogMode( ) 

Get the fog mode.

Returns:
The currently set fog mode.

void SetFogDensity(double pDensity ) 

Set the fog density.

Parameters:
pDensity The density of the fog. Can be any double value, however it is possible that other sections of FBX SDK may clamp values to reasonable values.
Remarks:
Only use this function when the fog mode is exponential or squareroot exponential.

double GetFogDensity( ) 

Get the fog density.

Returns:
The currently set fog density.
Remarks:
Only use this function when the fog mode is exponential or squareroot exponential.

void SetFogStart(double pStart ) 

Set the distance from the view where the fog starts.

Parameters:
pStart Distance where the fog starts.
Remarks:
Only use this function when the fog mode is linear. The new value is clamped to fit inside the interval [0, FogEnd()].

double GetFogStart( ) 

Get the distance from the view where the fog starts.

Returns:
The distance from the view where the fog starts.
Remarks:
Only use this function when the fog mode is linear.

void SetFogEnd(double pEnd ) 

Set the distance from the view where the fog ends.

Parameters:
pEnd Distance where the fog ends.
Remarks:
Only use this function when the fog mode is linear. The new value is adjusted to fit within the interval [FogStart(), inf).

double GetFogEnd( ) 

Get the distance from the view where the fog ends.

Returns:
The distance from the view where the fog ends.
Remarks:
Only use this function when the fog mode is linear.

void SetShadowEnable(bool pShadowEnable ) 

Enable or disable the shadow planes display.

Parameters:
pShadowEnable Set totrueto display shadow planes in the scene.

bool GetShadowEnable( ) 

Get the current state of the ShadowEnable flag.

Returns:
trueif shadow planes are set to be displayed in the scene.

void SetShadowIntensity(double pShadowIntensity ) 

Set the shadow intensity applied to all shadow planes.

Parameters:
pShadowIntensity Intensity applied to all the shadow planes.
Remarks:
Range is from 0 to 300.

double GetShadowIntensity( ) 

Get the shadow intensity applied to all shadow planes.

Returns:
The intensity applied to all shadow planes in the scene.
Remarks:
Range is from 0 to 300.

int GetShadowPlaneCount( ) 

Get the number of shadow planes.

Returns:
Number of shadow planes.

KFbxShadowPlane* GetShadowPlane(int pIndex ) 

Get a shadow plane.

Parameters:
pIndex Index of shadow plane.
Returns:
Pointer the shadow plane, orNULLif the index is out of range.
Remarks:
To identify the error, callKFbxGlobalLightSettings::GetLastErrorID()which returns eINDEX_OUT_OF_RANGE.

void AddShadowPlane(KFbxShadowPlane pShadowPlane ) 

Add a shadow plane.

Parameters:
pShadowPlane The shadow plane to add.

void RemoveAllShadowPlanes( ) 

Remove all shadow planes.

KError&GetError( ) 

Retrieve error object.

Returns:
Reference to error object.

EErrorGetLastErrorID( ) const

Get last error code.

Returns:
Last error code.

const char* GetLastErrorString( ) const

Get last error string.

Returns:
Textual description of the last error.

void RestoreDefaultSettings( ) 

Restore default settings.

constKFbxGlobalLightSettings&operator=(constKFbxGlobalLightSettingspGlobalLightSettings ) 

Assignment operator.