class ART::ILight

Light interface for light manipulation.

#include <ARTILight.h>

Inherits: IREDObject.

Public functions:

virtual voidGetAreaSize ( float & oWidth, float & oHeight ) const = 0
virtual ART::LIGHT_BAKINGGetBaking ( ) const = 0
virtual const RED::Color &GetDiffuse ( ) const = 0
virtual floatGetEffectDistance ( ) const = 0
virtual doubleGetIESAngle ( ) const = 0
virtual boolGetIESStretch ( ) const = 0
virtual intGetInstancesCount ( ) const = 0
virtual floatGetLuminousFlux ( ) const = 0
virtual RED_RCGetMatrix ( RED::Matrix & oTransform, int iInstance = 0 ) const = 0
virtual const RED::Color &GetPhysicalColor ( ) const = 0
virtual doubleGetShadowBias ( ) const = 0
virtual intGetShadowMapBlur ( ) const = 0
virtual intGetShadowMapSize ( ) const = 0
virtual ART::LIGHT_SHADOWGetShadowType ( ) const = 0
virtual floatGetSphereRadius ( ) const = 0
virtual floatGetSpotAngle ( ) const = 0
virtual floatGetSpotFalloff ( ) const = 0
virtual RED::Object *GetSpotTexture ( ) const = 0
virtual intGetSpotTextureSize ( ) const = 0
virtual RED::Object *GetStaticShadowMap ( int iInstance = 0 ) const = 0
virtual RED_RCGetStaticShadowMatrix ( RED::Matrix & oMatrix, const RED::Matrix & iOrigin, int iInstance = 0, ART::SIDE iSide = ART::S_FRONT ) const = 0
virtual ART::LIGHT_TYPEGetType ( ) const = 0
virtual boolHasIES ( ) const = 0
virtual boolIsActive ( ) const = 0
virtual boolIsEmitterVisible ( ) const = 0
virtual boolIsSharedBaking ( ) const = 0
virtual RED_RCSetActive ( bool iActive ) = 0
virtual voidSetBaking ( ART::LIGHT_BAKING iBaking ) = 0
virtual RED_RCSetDiffuse ( const RED::Color & iDiffuse ) = 0
virtual voidSetEmitterVisible ( bool iVisible ) = 0
virtual RED_RCSetIESStretch ( bool iStretch ) = 0
virtual RED_RCSetLuminousFlux ( float iLuminousFlux ) = 0
virtual RED_RCSetMatrix ( const RED::Matrix & iMatrix ) = 0
virtual voidSetPhysicalColor ( const RED::Color & iColor ) = 0
virtual voidSetShadowBias ( double iShadowBias ) = 0
virtual voidSetShadowMapBlur ( int iShadowMapBlur ) = 0
virtual voidSetShadowMapSize ( int iShadowMapSize ) = 0
virtual voidSetShadowType ( ART::LIGHT_SHADOW iShadowType ) = 0
virtual voidSetSharedBaking ( bool iShared ) = 0
virtual RED_RCSetSpotAngle ( float iAngle ) = 0
virtual RED_RCSetSpotFalloff ( float iFalloff ) = 0
virtual RED_RCSetStaticShadowMap ( RED::Object * iShadowMap, int iInstance = 0 ) = 0

Public static functions:

static RED::CIDGetClassID ( )

Functions documentation

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:

the light baking mode.
public virtual const RED::Color & ART::ILight::GetDiffuse() const = 0

Gets the light diffuse color.

Returns:

the diffuse color.
public virtual float ART::ILight::GetEffectDistance() const = 0

Gets the light effect distance.

Returns:

the effect distance.
public virtual double ART::ILight::GetIESAngle() const = 0

Gets the IES spot angle.

Returns:

the IES spot angle.
public virtual bool ART::ILight::GetIESStretch() const = 0

Gets the IES stretch.

Returns:

true if the IES is stretched, false if it is clamped.
public virtual int ART::ILight::GetInstancesCount() const = 0

Gets the number of light instances.

Returns:

the number of light instances.
public virtual float ART::ILight::GetLuminousFlux() const = 0

Gets the light luminous flux.

Returns:

the luminous flux in lumens.
public virtual RED_RC ART::ILight::GetMatrix(RED::Matrix &oTransform,
intiInstance = 0
)const = 0

Gets the lights transform.

Parameters:

oTransform:returned reference to the transform matrix.
iInstance:optional light instance to query.

Returns:

RED_OK if the method has succeeded,
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:

the physical color.
public virtual double ART::ILight::GetShadowBias() const = 0

Returns the shadow bias.

Returns:

The shadow bias.
public virtual int ART::ILight::GetShadowMapBlur() const = 0

Returns the shadow map blur kernel size in pixels.

Returns:

The shadow map blur.
public virtual int ART::ILight::GetShadowMapSize() const = 0

Returns the shadow map resolution.

Returns:

The shadow map size.

Gets the shadow map type.

Returns:

The shadow map type.
public virtual float ART::ILight::GetSphereRadius() const = 0

Gets the light radius in case of a spherical.

Returns:

the sphere emitter radius.
public virtual float ART::ILight::GetSpotAngle() const = 0

Gets the light spot angle.

Returns:

the spot angle.
public virtual float ART::ILight::GetSpotFalloff() const = 0

Gets the light spot falloff.

Returns:

the spot falloff.
public virtual RED::Object * ART::ILight::GetSpotTexture() const = 0

Gets the spot texture.

Returns:

The spot texture as RED::IImage2D.
public virtual int ART::ILight::GetSpotTextureSize() const = 0

Returns the spot texture resolution.

Returns:

The spot texture size.
public virtual RED::Object * ART::ILight::GetStaticShadowMap(intiInstance = 0) const = 0

Gets the static shadow map of the given light instance.

Parameters:

iInstance:optional light instance to query.

Returns:

The static shadow map as RED::IImage2D or NULL.
public virtual RED_RC ART::ILight::GetStaticShadowMatrix(RED::Matrix &oMatrix,
const RED::Matrix &iOrigin,
intiInstance = 0,
ART::SIDEiSide = 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:

the shadow map matrix.
public virtual ART::LIGHT_TYPE ART::ILight::GetType() const = 0

Gets the type of the light.

Returns:

the type of the light.
public virtual bool ART::ILight::HasIES() const = 0

Tests if the light has IES data.

Returns:

true if the light has IES data, false otherwise.
public virtual bool ART::ILight::IsActive() const = 0

Tells if the light is active.

Returns:

true if the light is active, false otherwise.
public virtual bool ART::ILight::IsEmitterVisible() const = 0

Tests if the light emitter is visible.

Returns:

True if the emitter is visible.
public virtual bool ART::ILight::IsSharedBaking() const = 0

Returns:

true if the light uses a shared GI cache with all other similar lights for its GI.
public virtual RED_RC ART::ILight::SetActive(booliActive) = 0

Sets the light active.

Parameters:

iActive:true to set the light active, false to inactivate it.

Returns:

RED_OK if the operation has succeeded,
Other RED_RCs from the REDsdk API.
public virtual void ART::ILight::SetBaking(ART::LIGHT_BAKINGiBaking) = 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(booliVisible) = 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(booliStretch) = 0

Sets the IES stretched or clamped at the spot angle.

Parameters:

iStretch:true to stretch the IES, false to clamp it.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if the method has received an invalid parameter,
RED_FAIL otherwise.
public virtual RED_RC ART::ILight::SetLuminousFlux(floatiLuminousFlux) = 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:

RED_OK if the operation has succeeded,
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetMatrix(const RED::Matrix &iMatrix) = 0

Sets the lights transform.

If the light has a parent body, its transform will be relative to it. Otherwise its transform will be relative to the world coordinates system.

Parameters:

iMatrix:The transform matrix.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
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(doubleiShadowBias) = 0

Sets the shadow bias.

Parameters:

iShadowBias:shadow bias.
public virtual void ART::ILight::SetShadowMapBlur(intiShadowMapBlur) = 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(intiShadowMapSize) = 0

Sets the shadow map size.

Parameters:

iShadowMapSize:size of the shadow map in pixels.
public virtual void ART::ILight::SetShadowType(ART::LIGHT_SHADOWiShadowType) = 0

Sets the shadow map type.

Parameters:

iShadowType:type of the shadows.
public virtual void ART::ILight::SetSharedBaking(booliShared) = 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(floatiAngle) = 0

Sets the light spot angle.

Parameters:

iAngle: the new spot angle.

Returns:

RED_OK if the operation has succeeded,
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetSpotFalloff(floatiFalloff) = 0

Sets the light spot falloff.

Parameters:

iFalloff:the new spot falloff.

Returns:

RED_OK if the operation has succeeded,
Other RED_RCs from the REDsdk API.
public virtual RED_RC ART::ILight::SetStaticShadowMap(RED::Object *iShadowMap,
intiInstance = 0
) = 0

Sets the shadow map static.

Parameters:

iShadowMap:static shadow map as RED::IImage2D.
iInstance:optional light instance to set.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if iShadowMap is not a valid RED::IImage2D or if iInstance does not exist,
RED_FAIL otherwise.