IFXAuthorMRMParams

This class provides a way to parameterize the MRM generation process in the Mesh compiler.

Interface Methods

Description

Reset

Returns all settings to the defaults

SetMerge

Sets the parameters for mesh merging

SetProgress

Sets up the progress call back

SetBaseVertices

Sets the base vertices array

SetMetric

Sets the metrics for edge collapses

SetNormal

Sets the mode for normal generation

SetUpMeshDamageArray

Sets up an array to receive mesh damage statistics on each collapse

GetMeshDamage

Gets access to the mesh damage array


IFXAuthorMRMParams::Reset ()

This method returns the object to its initial state.

Parameters:

None

Return Values

None


IFXAuthorMRMParams::SetMerge (F32 in_MergeThreshHold, U32 in_MergeWithin)

This method sets the merging flags.

Parameters:

F32 in_MergeThreshHold

Defines the distance within which vertices are allowed to merge even if not connected by edges. By default, only vertices connected by edges are merged.

U32 in_MergeWithin

Allows vertices within the same object to merge. The default is to merge across objects only.

Return Values

None


IFXAuthorMRMParams::SetProgress (PROGRESSCALLBACK in_CallBack, U32 in_ProgressFrequency)

This method sets up to receive progress callbacks on the mesh collapse process. The callback is called every in_ProgressFrequency edge removal.

Parameters:

PROGRESSCALLBACK in_CallBack

A pointer to a user-provided callback function that is called after the number of vertex removals specified. By default, no callback is made.

U32 in_ProgressFrequency

Number of vertex removals per callback. The first callback occurs at 0, and is invoked during MRMGenerate() or Generate(). Default is 1000.

Return Values

None


IFXAuthorMRMParams::SetBaseVertices (U32 in_NumBaseVertices, U32* in_BaseVertices)

This method sets the list of Vertices that should be last to be removed.

Parameters:

U32 in_NumBaseVertices

The number of entries in the baseVertices array. Default is 0.

U32* in_BaseVertices

Array of vertex indices. Indicates vertices that should be removed last. Default is NULL.

Return Values

None


IFXAuthorMRMParams::SetMetric (MRMG_METRIC in_metric1, MRMG_METRIC in_metric2, U32 in_metric2Start)

Low level description of method 2.

Parameters:

MRMG_METRIC in_metric1

Currently unused. Default is quadric error metric.

MRMG_METRIC in_metric2

No value needs to be set. By default, the Boundary Metric is used when this field's validity flag is set.

U32 in_metric2Start

Defines which vertex deletion should trigger a switch to metric2.

Return Values

None


IFXAuthorMRMParams::SetNormal (NormalsMode in_NormalsMode, F32 in_normalsCreaseAngle)

This method sets the normal merging behavior.

Parameters:

NormalsMode in_NormalsMode

Indicates how normals are maintained and updated. Its values are one of typedef enum {PerVertex, PerFacePerVertex} NormalsMode;

F32 in_normalsCreaseAngle

If PerFacePerVertex normals are used, normalsCreaseAngle indicates an angle threshold for sharing a vertex normal between two faces.

Return Values

None


IFXAuthorMRMParams::SetUpMeshDamageArray (U32 in_NumVerts)

This method allocates an array for mesh damage metrics to be stored in.

Parameters:

U32 in_NumVerts

Number of vertices in the mesh for which collapse damage needs to be detected.

Return Values

None


IFXAuthorMRMParams::GetMeshDamage ()

This method gets access to the mesh damage after the Mesh has been compiled.

Parameters:

None

Return Values

Pointer to the Array of mesh damage measurments

 

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