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.
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.
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
.
// 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;