IFXModelData

IFXModelData is the interface to the container component that is used by modifiers (IFXModifier).

IFXModelData provides access to parameters and pointers of a specific element in the scene. That element might be a meshgroup or a particle group. The ModelData container is used to encapsulate the parameters and information related to the element, which may be needed by any given modifier. IFXModelData inherits the IFXUnknown interface, and is supported by the CIFXModelData component.

When to Use

The IFXModelData interface is used to get or set modifier related parameters for a particular object. These parameters are held in a ModelData object (CIFXModelData). Modifiers require an IFXModelData interface from which they can query or set information for the element (model) upon which they are acting. Each model is associated with a list of modifiers, and the single CIFXModelData component is passed along (like a baton in a relay race) from modifier to modifier when the modifier list is triggered. Because the CIFXModelData component must service the needs of all possible modifiers, it contains a wide range of parameters. There are basic parameters, which provide access to the actual geometry of a model; there are parameters that describe which shaders are used to render the different parts of the element; there are parameters that facilitate collision detection; there are parameters which are intended primarily for use by a physics modifier.

Geometry

Interface Methods

Description

GetMeshGroup

Retrieves the IFXMeshGroup interface currently associated with the model data container.

SetMeshGroup

Assigns an IFXMeshGroup interface to the model data container

GetUpdatesGroup

Retrieves the IFXUpdatesGroup interface currently associated with the model data container

SetUpdatesGroup

Assigns an IFXUpdatesGroup interface to the model data container

GetEdgeGroup

Retrieves the IFXEdgeGroup interface currently associated with the model data container

SetEdgeGroup

Assigns an IFXEdgeGroup interface to the model data container

GetShaderStates

Retrieves the Shader state for the model

GetNeighborMesh

Retrieves a model's NeighborMesh or creates one if there are no update records

SetGeneratorNR

Sets the model's modifier generator

GetGeneratorNR

Gets the model's modifier generator

Shader mappings for the MeshGroup and EdgeGroup (1:1)

GetStyle

Retrieves the IFXStyle interface from the specified entry in the model data's style palette

GetStylePalette

Retrieves the IFXPalette interface for the model data's style palette

SetStylePalette

Assigns an IFXPalette interface to the model data for use as a style palette

Model sphere bound

RebuildBound

Recalculates the bounding sphere of the mesh group currently associated with the model data container

GetBound

Retrieves the IFXSGVector representing the mesh group's bounding sphere

SetBound

Assigns the specified IFXSGVector as the bounding sphere of the model data container's mesh group. Useful for avoiding the expensive RebuildBound() call

SetBoundVolumeUpdatesEnabled

Indicates whether the bound volume updates have been enabled

Physics

ComputeMeshGroupVolume

Computes the volume of each of the meshes in the mesh group and assigns each volume in the associated volume array

GetVolumeArray

Retrieves the volume array of the mesh group currently associated with the model data container

GetAngularDragCoefficient

Retrieves the coefficient of angular drag associated with the model data container's current mesh group

SetAngularDragCoefficient

Assigns an angular drag coefficient to the model data container's current mesh group

GetLinearDragCoefficient

Retrieves the coefficient of linear drag associated with the model data container's current mesh group

SetLinearDragCoefficient

Assigns a linear drag coefficient to the model data container's current mesh group

Model bounding hierarchy

GetBoundHierarchy

Retrieves the CIFXBoundHierarchy of the model data container's current mesh group

SetBoundHierarchy

Assigns a CIFXBoundHierarchy to the model data container's current mesh group

Particle System

GetParticleGroup

Retrieves the IFXParticleGroup interface of the particle group currently associated with the model data container

SetParticleGroup

Assigns an IFXParticleGroup interface to the model data container

Bound Hierarchy

SetBoundHierarchyDirtyFlag

Indicates whether the flag has been set

Cache status

GetModifiedStatus

Gets the modified cache status

SetModifiedStatus

Sets the modified cache status

ORModifiedStatus

Sets the modified channel status


IFXModelData::GetMeshGroup(IFXMeshGroup** ppOutMeshGroup)

This method retrieves a pointer to an IFXMeshGroup. This is the interface to the mesh group that is currently assigned to the model data container.

Parameters:

ppOutMeshGroup

The address of an IFXMeshGroup interface pointer

Return Values

Comments:

The mesh group is not relevant if the model data container is associated with a particle group.


IFXModelData::SetMeshGroup(IFXMeshGroup* pInMeshGroup)

This method assigns an IFXMeshGroup interface to the model data container. This is the interface to the mesh group currently assigned to the model data container.

Parameters:

pInMeshGroup

A pointer to a mesh group interface

Return Values

Comments:

The mesh group is not relevant if the model data container is associated with a particle group.


IFXModelData::GetUpdatesGroup(IFXUpdatesGroup** ppOutUpdatesGroup)

This method retrieves a pointer to an IFXUpdatesGroup. This is the interface to the updates group that is currently assigned to the model data container. UpdateGroups are necessary for MRM level of detail modifications.

Parameters:

ppOutUpdatesGroup

The address of an IFXUpdatesGroup interface pointer

Return Values

Comments:

The updates group is not relevant if the model data container is associated with a particle group.


IFXModelData::SetUpdatesGroup(IFXUpdatesGroup* pInUpdatesGroup)

This method assigns an IFXUpdatesGroup interface to the model data container. This is the interface to the updates group currently assigned to the model data container. UpdateGroups are necessary for MRM level of detail modifications.

Parameters:

pInUpdatesGroup

A pointer to an IFXUpdatesGroup interface

Return Values

Comments:

The updates group is not relevant if the model data container is associated with a particle group.


IFXModelData::GetEdgeGroup(IFXEdgeGroup** ppOutEdgeGroup)

This method retrieves a pointer to an IFXEdgeGroup. This is the interface to the edge group that is currently assigned to the model data container. EdgeGroups are used by modifiers that generate or access edgelists for the geometry in the model data. A model data container is not required to have an edge group interface, so this method can legitimately return a NULL pointer.

Parameters:

ppOutEdgeGroup

The address of an IFXEdgeGroup interface pointer

Return Values

Comments:

The method can return NULL if the model data container does not currently contain an EdgeGroup interface. The edge group is not relevant if the model data container is associated with a particle group.


IFXModelData::SetEdgeGroup(IFXEdgeGroup* pInEdgeGroup)

This method assigns an IFXEdgeGroup interface to the model data container. This is the interface to the edge group currently assigned to the model data container. EdgeGroups are used by modifiers that generate or access edgelists for the geometry in the model data. A model data container is not required to have an edge group interface, and thus this method can legitimately accept a NULL argument.

Parameters:

pInEdgeGroup

A pointer to an IFXEdgeGroup interface

Return Values

Comments:

It is acceptable for pInEdgeGroup to be NULL. This causes the model data container to disassociate from any EdgeGroup currently assigned to it. The edge group is not relevant if the model data container is associated with a particle group.


IFXShaderData::GetShaderStates(SIFXModelShaderState** ppOutShaderState)

This method retrieves the shader state of a model.

Parameters:

ppOutShaderState

Pointer to SIFXModelShaderState

Return Values


IFXShaderData::GetNeighborMesh(IFXNeighborMesh** ppOutNeighborMesh)

This method retrieves the model's NeighborMesh. It allows a NeighborMesh to be created if no update records exist.

Parameters:

ppOutNeighborMesh

Pointer to IFXNeighborMesh

Return Values


IFXShaderData::SetGeneratorNR( IFXModifier* pGenerator )

This method sets the model's modifier generator.

Parameters:

pGenerator

Pointer to IFXModifier

Return Values


IFXShaderData::GetGeneratorNR( IFXModifier** ppOutGenerator )

This method retrieves the model's modifier generator.

Parameters:

ppOutGenerator

Handle to IFXModifier

Return Values


IFXModelData::GetStyle(U32 uInStyle,IFXStyle** ppOutStyle)

This method retrieves a pointer to an IFXStyle. This is the interface to the style that is currently assigned to the specified mesh in the model data's mesh group. See IFXStyle for further information on styles.

Parameters:

uInStyle

The index of the desired style in the model data's StylePalette. This corresponds to the index into the mesh group of the mesh to which the style is assigned.

ppOutStyle

The address of an IFXStyle interface pointer

Return Values:

X - This method will relay the return values of any internal function calls which failed.

Comments:

The style is not relevant if the model data container is associated with a particle group.


IFXModelData::GetStylePalette(IFXPalette** ppOutStylePalette)

This method retrieves a pointer to an IFXPalette. This is the interface to the StylePalette that is currently assigned to the model data's mesh group. The StylePalette must have an entry for every mesh in the mesh group. See IFXStyle for further information on styles.

Parameters:

ppOutStylePalette

The address of an IFXPalette interface pointer

Return Values:

X - This method will relay the return values of any internal function calls which failed.

Comments:

You must call Release() on *ppOutStylePalette after you are finished using the palette.

The style is not relevant if the model data container is associated with a particle group.


IFXModelData::SetStylePalette(IFXPalette* pInStylePalette)

This method assigns an IFXPalette interface to the model data container. This is the interface to the StylePalette that is currently assigned to the model data's mesh group. The StylePalette must have an entry for every mesh in the mesh group. See IFXStyle for further information on styles.

Parameters:

pInStylePalette

A pointer to an IFXPalette interface

Return Values

Comments:

It is not necessary to call AddRef() on pInStylePalette prior to calling SetStylePalette.


IFXModelData::RebuildBound()

This method calculates the bounding sphere of the entire meshgroup of the model data container.

Parameters:

None

Return Values


IFXModelData::GetBound(IFXSGVector* pOutBoundingSphere)

This method retrieves an IFXSGVector which represents the bounding sphere of the mesh group assigned to the model data container. The (x,y,z) values of the retrieved vector are the coordinates of the center of the bounding sphere, the (h) component of the vector is the radius of the sphere. All values are in model space.

Parameters:

pOutBoundingSphere

A pointer to an IFXSGVector interface

Return Values


IFXModelData::SetBound(IFXSGVector BoundingSphere)

This method assigns a bounding sphere (in the form of a 4 component vector) for the meshgroup of the model data container. This method should be used when bounding information already exists, in order to avoid the expensive RebuildBound() method.

Parameters:

IFXSGVectorBoundingSphere

Vector representing the bounding sphere of a meshgroup

Return Values:

None


IFXModelData::SetBoundVolumeUpdatesEnabled( BOOL bEnabled )

This method indicates whether the bound volume updates have been enabled.

Parameters:

bEnabled

Enabled status

Return Values:

None


IFXModeldata::ComputeMeshGroupVolume()

This method computes the volume of each of the meshes in the MeshGroup and fills in each volume in the volume array of the model data container.

Parameters:

None

Return Values

X - This method will relay the return values of any internal function calls which failed.


IFXModeldata::GetVolumeArray(F32** ppfVolumeArray)

This method retrieves the volume array of the MeshGroup currently associated with the model data container. The volume array is just an array of floats (F32), with one entry for each mesh in the mesh group.

Parameters:

ppfVolumeArray

Pointer to the volume array

Return Values


IFXModeldata::GetAngularDragCoefficient(F32* pfOutAngularDragCoefficient)

This method retrieves the coefficient of angular drag, which applies to the MeshGroup as a whole.

Parameters:

pfOutAngularDragCoefficient

A pointer to the floating point value representing the angular drag coefficient

Return Values


IFXModelData::SetAngularDragCoefficient(F32 fInAngularDragCoefficient)

This method assigns the coefficient of angular drag, which applies to the MeshGroup as a whole.

Parameters:

fInAngularDragCoefficient

A floating point value representing the angular drag coefficient

Return Values


IFXModelData::GetLinearDragCoefficient(F32* pfOutLinearDragCoefficient)

This method retrieves the coefficient of linear drag, which applies to the MeshGroup as a whole.

Parameters:

pfOutLinearDragCoefficient

A pointer to the floating point value representing the linear drag coefficient

Return Values


IFXModelData::SetLinearDragCoefficient(F32 fInLinearDragCoefficient)

This method assigns the coefficient of linear drag, which applies to the MeshGroup as a whole.

Parameters:

fInLinearDrawCoefficient

A floating point value representing the linear drag coefficient

Return Values


IFXModelData::GetBoundHierarchy(CIFXBoundHierarchy** ppOutBoundHierarchy)

This method retrieves a CIFXBoundHierarchy object, which is the bounding hierarchy for the model data container's current MeshGroup.

Parameters:

ppOutBoundHierarchy

The address of a pointer to a CIFXBoundHierarchy object

Return Values


IFXModelData::SetBoundHierarchy(CIFXBoundHierarchy* pInBoundHierarchy)

This method assigns a CIFXBoundHierarchy object to the model data container. This will be used as the bounding hierarchy for the model data container's current MeshGroup.

Parameters:

pInBoundHierarchy

A pointer to a CIFXBoundHierarchy object

Return Values


IFXModelData::GetModifiedStatus()

This method gets the modified status.

Parameters:

None

Return Values:

U32


IFXModelData::SetModifiedStatus(U32 uInModifiedStatusBitField)

This method sets the modified status.

Parameters:

uInModifiedStatusBitField

Bit field number

Return Values:

None


IFXModelData::GetReallocatedStatus()

This method gets reallocated status.

Parameters:

None

Return Values:

U32


IFXModelData::SetReallocatedStatus(U32 uInReallocatedStatusBitField)

This method sets reallocated status.

Parameters:

uInReallocatedStatusBitField

Bit field number

Return Values:

None


IFXModeldata::GetParticleGroup(IFXParticleGroup** ppOutParticleGroup)

This method retrieves the interface to the particle group currently associated with the model data container, if in fact there is a particle group.

Parameters:

ppOutParticleGroup

The address of an IFXParticleGroup interface pointer

Return Values


IFXModeldata::SetParticleGroup(IFXParticleGroup* pInParticleGroup)

This method assigns an IFXParticleGroup interface to the model data container.

Parameters:

pInParticleGroup

A pointer to an IFXParticleGroup interface

Return Values


IFXModeldata::SetBoundHierarchyDirtyFlag(BOOL bBoundHierarchyDirtyFlag)

This method indicates whether the flag has been set.

Parameters:

bBoundHierarchyDirtyFlag

Indicator of whether the flag has been set

Return Values:

None


IFXModeldata::ORModifiedStatus( U32 uInModifiedStatusChannels )

This method sets the modified status channel number.

Parameters:

uInModifiedStatusChannels

Channel number

Return Values:

None

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