Vector2 GetTextureOffset( FaceHandle hFace )

book_4_sparkGenerated
code_blocksInput

Description

The GetTextureOffset method retrieves the texture offset of a specified face in a polygon mesh. This offset is represented as a Vector2, which typically contains the horizontal and vertical offsets used in texture mapping.

Usage

To use the GetTextureOffset method, you need to have a HalfEdgeMesh.FaceHandle that identifies the face whose texture offset you want to retrieve. This method is a member of the PolygonMesh class and is not static, so it must be called on an instance of PolygonMesh.

Example

// Assume 'polygonMesh' is an instance of PolygonMesh
// and 'faceHandle' is a valid HalfEdgeMesh.FaceHandle
Vector2 textureOffset = polygonMesh.GetTextureOffset(faceHandle);

// Use the textureOffset as needed
float offsetX = textureOffset.x;
float offsetY = textureOffset.y;