IntegratedMetricTensor.ComputeFromTexture(Mesh,Texture,Int32,ImtWrap) Method (Microsoft.DirectX.Direct3D)

Calculates an IMT from texture data.

Definition

Visual Basic Public Shared Function ComputeFromTexture( _
    ByVal mesh As Mesh, _
    ByVal texture As Texture, _
    ByVal textureIndex As Integer, _
    ByVal flags As ImtWrap _
) As GraphicsStream
C# public static GraphicsStream ComputeFromTexture(
    Mesh mesh,
    Texture texture,
    int textureIndex,
    ImtWrap flags
);
C++ public:
static GraphicsStreamComputeFromTexture(
    Meshmesh,
    Texturetexture,
    int textureIndex,
    ImtWrap flags
);
JScript public static function ComputeFromTexture(
    mesh : Mesh,
    texture : Texture,
    textureIndex : int,
    flags : ImtWrap
) : GraphicsStream;

Parameters

mesh Microsoft.DirectX.Direct3D.Mesh
An input mesh (see Mesh) that contains the object geometry for calculating the IMT.
texture Microsoft.DirectX.Direct3D.Texture
The texture (see Texture) that is mapped to the mesh.
textureIndex System.Int32
Zero-based texture coordinate index that identifies which set of texture coordinates to use.
flags Microsoft.DirectX.Direct3D.ImtWrap
Combination of one or more ImtWrap flags.

Return Value

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

Remarks

Given a texture that maps over the surface of the mesh, the algorithm computes the IMT for each face. This will cause large areas that are very similar to occupy less room when parameterized with UVAtlas. The texture is assumed to be interpolated over the mesh bilinearly.

Exceptions

Direct3DXException

The operation failed.