IntegratedMetricTensor.ComputeFromPerVertexSignal Method

Language:

Calculates an IMT from from per-vertex data.

Definition

Visual Basic Public Shared Function ComputeFromPerVertexSignal( _
    ByVal mesh As Mesh, _
    ByVal vertexSignal() As Single, _
    ByVal signalDimension As Integer, _
    ByVal signalStride As Integer _
) As GraphicsStream
C# public static GraphicsStream ComputeFromPerVertexSignal(
    Mesh mesh,
    float[] vertexSignal,
    int signalDimension,
    int signalStride
);
C++ public:
static GraphicsStreamComputeFromPerVertexSignal(
    Meshmesh,
    array<float>^ vertexSignal,
    int signalDimension,
    int signalStride
);
JScript public static function ComputeFromPerVertexSignal(
    mesh : Mesh,
    vertexSignal : float[],
    signalDimension : int,
    signalStride : int
) : GraphicsStream;

Parameters

mesh Microsoft.DirectX.Direct3D.Mesh
An input mesh (see Mesh) that contains the object geometry for calculating the IMT.
vertexSignal System.Single[]
An array of floating-point values that represent per-vertex signal data. The array size is signalStride * v, where v is the number of vertices in the input mesh.
signalDimension System.Int32
The number of floating-point values per vertex.
signalStride System.Int32
The number of bytes per vertex in the array. This must be a multiple of sizeof(Single).

Return Value

Microsoft.DirectX.GraphicsStream
A GraphicsStream that will return the calculated IMT data.

Remarks

ComputeFromPerVertexSignal sets up a linear system over the triangle, solves for the jacobian J, then constructs the IMT from that (J^TJ). This function enables you to calculate the IMT based off of any value in a mesh (color, normal, and so on) by specifying the correct stride of the array. The IMT computed will cause areas of the mesh with similar values to occupy less space in the texture.

Exceptions
Direct3DXException The operation failed.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.