void SetTextureScale( FaceHandle hFace, Vector2 scale )

book_4_sparkGenerated
code_blocksInput

Description

The SetTextureScale method is used to set the texture scale of a specific face in a polygon mesh. This method allows you to adjust how a texture is scaled across a face, which can be useful for achieving the desired visual appearance in a 3D model.

Usage

To use the SetTextureScale method, you need to provide a face handle and a scale vector. The face handle identifies which face of the mesh you want to modify, and the scale vector determines how the texture is scaled along the U and V axes.

Example usage:

PolygonMesh mesh = new PolygonMesh();
HalfEdgeMesh.FaceHandle faceHandle = ...; // Obtain the face handle
Vector2 scale = new Vector2(2.0f, 2.0f); // Scale the texture by 2x in both directions
mesh.SetTextureScale(faceHandle, scale);

Example

PolygonMesh mesh = new PolygonMesh();
HalfEdgeMesh.FaceHandle faceHandle = ...; // Obtain the face handle
Vector2 scale = new Vector2(2.0f, 2.0f); // Scale the texture by 2x in both directions
mesh.SetTextureScale(faceHandle, scale);