class ART::ILight
Light interface for light manipulation.
#include <ARTILight.h>
Inherits: IREDObject.
Public functions:
virtual void | GetAreaSize ( float & oWidth, float & oHeight ) const = 0 |
virtual ART::LIGHT_BAKING | GetBaking ( ) const = 0 |
virtual const RED::Color & | GetDiffuse ( ) const = 0 |
virtual float | GetEffectDistance ( ) const = 0 |
virtual double | GetIESAngle ( ) const = 0 |
virtual bool | GetIESStretch ( ) const = 0 |
virtual int | GetInstancesCount ( ) const = 0 |
virtual float | GetLuminousFlux ( ) const = 0 |
virtual RED_RC | GetMatrix ( RED::Matrix & oTransform, int iInstance = 0 ) const = 0 |
virtual const RED::Color & | GetPhysicalColor ( ) const = 0 |
virtual double | GetShadowBias ( ) const = 0 |
virtual int | GetShadowMapBlur ( ) const = 0 |
virtual int | GetShadowMapSize ( ) const = 0 |
virtual ART::LIGHT_SHADOW | GetShadowType ( ) const = 0 |
virtual float | GetSphereRadius ( ) const = 0 |
virtual float | GetSpotAngle ( ) const = 0 |
virtual float | GetSpotFalloff ( ) const = 0 |
virtual RED::Object * | GetSpotTexture ( ) const = 0 |
virtual int | GetSpotTextureSize ( ) const = 0 |
virtual RED::Object * | GetStaticShadowMap ( int iInstance = 0 ) const = 0 |
virtual RED_RC | GetStaticShadowMatrix ( RED::Matrix & oMatrix, const RED::Matrix & iOrigin, int iInstance = 0, ART::SIDE iSide = ART::S_FRONT ) const = 0 |
virtual ART::LIGHT_TYPE | GetType ( ) const = 0 |
virtual bool | HasIES ( ) const = 0 |
virtual bool | IsActive ( ) const = 0 |
virtual bool | IsEmitterVisible ( ) const = 0 |
virtual bool | IsSharedBaking ( ) const = 0 |
virtual RED_RC | SetActive ( bool iActive ) = 0 |
virtual void | SetBaking ( ART::LIGHT_BAKING iBaking ) = 0 |
virtual RED_RC | SetDiffuse ( const RED::Color & iDiffuse ) = 0 |
virtual void | SetEmitterVisible ( bool iVisible ) = 0 |
virtual RED_RC | SetIESStretch ( bool iStretch ) = 0 |
virtual RED_RC | SetLuminousFlux ( float iLuminousFlux ) = 0 |
virtual RED_RC | SetMatrix ( const RED::Matrix & iMatrix ) = 0 |
virtual void | SetPhysicalColor ( const RED::Color & iColor ) = 0 |
virtual void | SetShadowBias ( double iShadowBias ) = 0 |
virtual void | SetShadowMapBlur ( int iShadowMapBlur ) = 0 |
virtual void | SetShadowMapSize ( int iShadowMapSize ) = 0 |
virtual void | SetShadowType ( ART::LIGHT_SHADOW iShadowType ) = 0 |
virtual void | SetSharedBaking ( bool iShared ) = 0 |
virtual RED_RC | SetSpotAngle ( float iAngle ) = 0 |
virtual RED_RC | SetSpotFalloff ( float iFalloff ) = 0 |
virtual RED_RC | SetStaticShadowMap ( RED::Object * iShadowMap, int iInstance = 0 ) = 0 |
Public static functions:
static RED::CID | GetClassID ( ) |
Functions documentation
public static RED::CID ART::ILight::GetClassID | ( | ) |
public virtual void ART::ILight::GetAreaSize | ( | float & | oWidth, |
float & | oHeight | ||
) | const = 0 |
Gets the light size in the case of an area.
Parameters:
oWidth: | width of the area. |
oHeight: | height of the area. |
public virtual ART::LIGHT_BAKING ART::ILight::GetBaking | ( | ) const = 0 |
Gets the light baking mode.
Returns:
public virtual const RED::Color & ART::ILight::GetDiffuse | ( | ) const = 0 |
Gets the light diffuse color.
Returns:
public virtual float ART::ILight::GetEffectDistance | ( | ) const = 0 |
Gets the light effect distance.
Returns:
public virtual double ART::ILight::GetIESAngle | ( | ) const = 0 |
Gets the IES spot angle.
Returns:
public virtual bool ART::ILight::GetIESStretch | ( | ) const = 0 |
Gets the IES stretch.
Returns:
public virtual int ART::ILight::GetInstancesCount | ( | ) const = 0 |
Gets the number of light instances.
Returns:
public virtual float ART::ILight::GetLuminousFlux | ( | ) const = 0 |
Gets the light luminous flux.
Returns:
public virtual RED_RC ART::ILight::GetMatrix | ( | RED::Matrix & | oTransform, |
int | iInstance = 0 | ||
) | const = 0 |
Gets the lights transform.
Parameters:
oTransform: | returned reference to the transform matrix. |
iInstance: | optional light instance to query. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_FAIL otherwise.
public virtual const RED::Color & ART::ILight::GetPhysicalColor | ( | ) const = 0 |
Gets the light physical color.
Returns:
public virtual double ART::ILight::GetShadowBias | ( | ) const = 0 |
Returns the shadow bias.
Returns:
public virtual int ART::ILight::GetShadowMapBlur | ( | ) const = 0 |
Returns the shadow map blur kernel size in pixels.
Returns:
public virtual int ART::ILight::GetShadowMapSize | ( | ) const = 0 |
Returns the shadow map resolution.
Returns:
public virtual ART::LIGHT_SHADOW ART::ILight::GetShadowType | ( | ) const = 0 |
Gets the shadow map type.
Returns:
public virtual float ART::ILight::GetSphereRadius | ( | ) const = 0 |
Gets the light radius in case of a spherical.
Returns:
public virtual float ART::ILight::GetSpotAngle | ( | ) const = 0 |
Gets the light spot angle.
Returns:
public virtual float ART::ILight::GetSpotFalloff | ( | ) const = 0 |
Gets the light spot falloff.
Returns:
public virtual RED::Object * ART::ILight::GetSpotTexture | ( | ) const = 0 |
public virtual int ART::ILight::GetSpotTextureSize | ( | ) const = 0 |
Returns the spot texture resolution.
Returns:
public virtual RED::Object * ART::ILight::GetStaticShadowMap | ( | int | iInstance = 0 | ) const = 0 |
Gets the static shadow map of the given light instance.
Parameters:
iInstance: | optional light instance to query. |
Returns:
public virtual RED_RC ART::ILight::GetStaticShadowMatrix | ( | RED::Matrix & | oMatrix, |
const RED::Matrix & | iOrigin, | ||
int | iInstance = 0, | ||
ART::SIDE | iSide = ART::S_FRONT | ||
) | const = 0 |
Computes the static shadow matrix of the given light instance.
Parameters:
oMatrix: | returned shadow matrix. |
iOrigin: | floating origin. |
iInstance: | optional light instance. |
iSide: | optional side for point light shadows. |
Returns:
public virtual ART::LIGHT_TYPE ART::ILight::GetType | ( | ) const = 0 |
Gets the type of the light.
Returns:
public virtual bool ART::ILight::HasIES | ( | ) const = 0 |
Tests if the light has IES data.
Returns:
public virtual bool ART::ILight::IsActive | ( | ) const = 0 |
Tells if the light is active.
Returns:
public virtual bool ART::ILight::IsEmitterVisible | ( | ) const = 0 |
Tests if the light emitter is visible.
Returns:
public virtual bool ART::ILight::IsSharedBaking | ( | ) const = 0 |
Returns:
public virtual RED_RC ART::ILight::SetActive | ( | bool | iActive | ) = 0 |
Sets the light active.
Parameters:
iActive: | true to set the light active, false to inactivate it. |
Returns:
Other RED_RCs from the REDsdk API.
public virtual void ART::ILight::SetBaking | ( | ART::LIGHT_BAKING | iBaking | ) = 0 |
Sets the light baking mode.
Parameters:
iBaking: | the light baking mode. |
public virtual RED_RC ART::ILight::SetDiffuse | ( | const RED::Color & | iDiffuse | ) = 0 |
Sets the light diffuse color.
If the light is a physical light, the methods ART::ILight::SetPhysicalColor and ART::ILight::SetLuminousFlux should be prefered instead of ART::ILight::SetDiffuse. It ensures the physical correctness of the light.
Parameters:
iDiffuse: | the light diffuse color. |
public virtual void ART::ILight::SetEmitterVisible | ( | bool | iVisible | ) = 0 |
Sets the light emitter shape visible.
Parameters:
iVisible: | true to show the emitter, false to hide it. |
public virtual RED_RC ART::ILight::SetIESStretch | ( | bool | iStretch | ) = 0 |
Sets the IES stretched or clamped at the spot angle.
Parameters:
iStretch: | true to stretch the IES, false to clamp it. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_FAIL otherwise.
public virtual RED_RC ART::ILight::SetLuminousFlux | ( | float | iLuminousFlux | ) = 0 |
Sets the light luminous flux in lumens.
If the light is a physical light, the methods ART::ILight::SetPhysicalColor and ART::ILight::SetLuminousFlux should be prefered instead of ART::ILight::SetDiffuse. It ensures the physical correctness of the light.
Parameters:
iLuminousFlux: | the light luminous flux. |
Returns:
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetMatrix | ( | const RED::Matrix & | iMatrix | ) = 0 |
public virtual void ART::ILight::SetPhysicalColor | ( | const RED::Color & | iColor | ) = 0 |
Sets the light physical color.
If the light is a physical light, the methods ART::ILight::SetPhysicalColor and ART::ILight::SetLuminousFlux should be prefered instead of ART::ILight::SetDiffuse. It ensures the physical correctness of the light.
Parameters:
iColor: | the light physical color. |
public virtual void ART::ILight::SetShadowBias | ( | double | iShadowBias | ) = 0 |
Sets the shadow bias.
Parameters:
iShadowBias: | shadow bias. |
public virtual void ART::ILight::SetShadowMapBlur | ( | int | iShadowMapBlur | ) = 0 |
Sets the shadow map blur kernel size in pixels.
Parameters:
iShadowMapBlur: | size of the shadow map blur kernel in pixels between 1 and 20. |
public virtual void ART::ILight::SetShadowMapSize | ( | int | iShadowMapSize | ) = 0 |
Sets the shadow map size.
Parameters:
iShadowMapSize: | size of the shadow map in pixels. |
public virtual void ART::ILight::SetShadowType | ( | ART::LIGHT_SHADOW | iShadowType | ) = 0 |
Sets the shadow map type.
Parameters:
iShadowType: | type of the shadows. |
public virtual void ART::ILight::SetSharedBaking | ( | bool | iShared | ) = 0 |
Sets whether the light will own a proprietary GI cache for its baking or not.
Parameters:
iShared: | true to share the GI cache, false to keep a proprietary cache. |
public virtual RED_RC ART::ILight::SetSpotAngle | ( | float | iAngle | ) = 0 |
Sets the light spot angle.
Parameters:
iAngle | : the new spot angle. |
Returns:
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetSpotFalloff | ( | float | iFalloff | ) = 0 |
Sets the light spot falloff.
Parameters:
iFalloff: | the new spot falloff. |
Returns:
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetStaticShadowMap | ( | RED::Object * | iShadowMap, |
int | iInstance = 0 | ||
) | = 0 |
Sets the shadow map static.
Parameters:
iShadowMap: | static shadow map as RED::IImage2D. |
iInstance: | optional light instance to set. |
Returns:
RED_BAD_PARAM if iShadowMap is not a valid RED::IImage2D or if iInstance does not exist,
RED_FAIL otherwise.