IFXStyle

The IFXStyle interface gets and sets Shader IDs for a meshgroup. Additionally, the interface is used to retrieve several physics-related parameters for a meshgroup. Styles are really only relevant for a particular meshgroup, as the primary function is to map a Shader ID to every mesh in the meshgroup. Thus, styles contain a list of Shader IDs, with one ID for every mesh. For a style to apply to different meshgroups, the meshgroups must have the same number of meshes. A given meshgroup can have many styles that are defined for it, but only a single style is used for each ModelData instance which uses the meshgroup. IFXStyle inherits the IFXUnknown interface. It is supported by the CIFXStyle component.

When to Use

IFXStyle will be used to map ShaderIDs to the individual meshes of a meshgroup. The IFXStyle interface is also used to get and set various physics-related properties of the meshgroup. ShaderIDs are used to index the scenegraph's ShaderPalette to reference specific shaders. Each entry in the ShaderPalette is actually the first shader in a linked list of shaders. A given list of shaders represents a process for rendering a mesh. So, the IFXStyle is used to associate a rendering method with each mesh in a meshgroup by assigning a ShaderID to each mesh. Similarly, the IFXStyle is used to associate specific physics-related parameters with the meshgroup as a whole. These parameters help determine and describe how the meshgroup behaves in the scene as it is subjected to forces and impulses from the physics engine.

Interface Methods

Description

Initialize

Initializes the object for use

GetShaderID

Gets the ID of the Shader

GetShaderName

Gets the name of the Shader

GetShaderName

Gets the name of the Shader

SetShaderID

Sets the ID of the Shader


IFXStyle::Initialize(U32 uInNumberOfMeshes,IFXSceneGraph* pInSceneGraph)

Parameters:

uInNumberOfMeshes

Number of meshes

pInSceneGraph

Pointer to the IFXScenegraph

Return Values


IFXStyle::GetShaderID(U32 uInMeshIndex,U32* puShaderID)

Parameters:

uInMeshIndex

MeshIndex ID number

puShaderID

Shader ID number

Return Values


IFXStyle::GetShaderName(U32 uInMeshIndex,CHAR* pOutName,U32* puOutNameLength)

Parameters:

uInMeshIndex

MeshIndex ID number

pOutName

Shader name

puOutNameLength

Length of Shader name

Return Values


IFXStyle::GetShaderName(U32 uInMeshIndex,CIFXString *pOutName)

Parameters:

uInMeshIndex

MeshIndex ID number

pOutName

Shader name

Return Values


IFXStyle::SetShaderID(U32 uInMeshIndex,U32 uInShaderID)

Parameters:

uInMeshIndex

MeshIndex ID number

uInShaderID

Shader ID number

Return Values

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