TextureGutterHelper.ResampleTexture(ID3DXTextureGutterHelper) Method (Microsoft.DirectX.Direct3D)
Resamples a texture into this gutterhelper's parameterization.
Visual Basic Public Sub ResampleTexture( _
ByVal texture As Texture, _
ByVal mesh As Mesh, _
ByVal usage As DeclarationUsage, _
ByVal usageIndex As Integer, _
ByVal textureOut As Texture _
C# public void ResampleTexture(
JScript public function ResampleTexture(
texture : Texture,
mesh : Mesh,
usage : DeclarationUsage,
usageIndex : int,
textureOut : Texture
A Texture object that corresponds to the original parameterization stored in mesh. This texture will be used to create textureOut.
A Mesh object containing the original and new parameterizations. It is required to store the new parameterization in TextureCoordinate index 0.
A DeclarationUsage object (used in combination with usageIndex) which identifies the component of the vertex declaration that contains the original parameterization in mesh.
Zero-based index (used in combination with usage), which identifies the component of the vertex declaration that contains the original parameterization in mesh. The combination of TextureCoordinate and index 0 is required for the new parameterization; any other usage/index combination may be used.
The resampled Texture object.
A parameterization in the case of this function is a set of texture coordinates that maps the triangles of a mesh to the triangles on a texture. The new parameterization is the set of texture coordinates contained in the gutter helper interface, and the original parameterization is the set of texture coordinates contained within the input mesh.
It is assumed that texture coordinates are between 0 and 1, inclusive, and the new parameterization must be declared in the vertex declaration as texture coordinate index 0. The original texture and the resampled texture must have the same width and height.
One common scenario might be to use UVAtlas to create a texture atlas and then use ResampleTexture to resample the texture into the new parameterization.