IFXLight

IFXLight is the interface used to associate light entities in the scenegraph with specific light resources (with IFXLightResource interfaces). The light resources can be shared among many lights, whereas each IFXLight represents a single node in the scenegraph. IFXLight inherits the IFXNode interface and, therefore, also the IFXMarker and IFXUnknown interface. It is supported by the CIFXLight component.

When to Use

IFXLight is used whenever a light in the scenegraph needs to be associated with a specific light resource object in the scenegraph's light resource palette, or when that resource needs to be retrieved through the IFXLight. All other scenegraph related usage should be accomplished by querying for the light's IFXMarker or IFXNode interfaces.

Interface Methods

Description

GetLightResource

Retrieves the IFXLightResource interface for the light

GetLightResourceID

Retrieves the ID of the light resource associated with this light

SetLightResourceID

Assigns an IFXLightResource ID to the light

Enable

Enable the light, so that it effects the scene

Disable

Disable the light, so that it does not effect the scene


IFXLight::GetLightResource(IFXLightResource** ppOutLightResource)

Retrieves the IFXLightResource interface currently associated with this light node.

Parameters:

ppOutLightResource

The address of an IFXLightResource interface pointer

Return Values


IFXLight::GetLightResourceID(U32* pValue)

Retrieves the ID of the IFXLightResource associated with this light. The ID corresponds to the index of the IFXLightResource in the scenegraph's light resource palette.

Parameters:

pValue

A pointer to an unsigned integer which will be set to the ID

Return Values


IFXLight::SetLightResourceID(U32 uValue)

Assigns an IFXLightResource ID to the light. This ID corresponds to the index of an IFXLightResource entry in the scenegraph's light resource palette.

Parameters:

pValue

The ID of the IFXLightResource being assigned to this light

Return Values


IFXLight::Enable(IFXRenderLayer* pRenderLayer, U32 uInlightID)

This method uses the specified RenderLayer interface to establish the appropriate settings and states that allow the light to contribute to the rendered scene.

Parameters:

pRenderLayer

A pointer to an IFXRenderLayer interface

uInLightID

Light ID

Return Values:

None


IFXLight::Disable(IFXRenderLayer* pRenderLayer, U32 uInLightID)

This method uses the specified RenderLayer interface to establish the appropriate settings and states that prevent the light from contributing to the rendered scene.

Parameters:

pRenderLayer

A pointer to an IFXRenderLayer interface

uInLightID

Light ID

Return Values:

None

 

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.