Click or drag to resize
Ab4d.SharpEngine logo

MeshUtilsGeneratePlanarTextureCoordinates(StandardMesh, Vector3, Vector3, Boolean, Boolean, Boolean) Method

Generate texture coordinates for the given mesh. Texture coordinates are computed using planar projection. The plane is defined by the normal vector (perpendicular to the plane surface) and direction vector along the plane surface (i.e., the Y direction of the 2D plane shape).

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static void GeneratePlanarTextureCoordinates(
	StandardMesh mesh,
	Vector3 planeNormalVector,
	Vector3 planeHeightVector,
	bool flipXCoordinate = false,
	bool flipYCoordinate = false,
	bool flipBackwardFacingXCoordinate = false
)

Parameters

mesh  StandardMesh
StandardMesh that gets generated texture coordinates
planeNormalVector  Vector3
Vector that defines the plane normal (i.e., perpendicular to the plane's surface).
planeHeightVector  Vector3
Vector that defines the direction along the plane surface (i.e., along the Y direction of the 2D plane shape).
flipXCoordinate  Boolean  (Optional)
Invert/flip the X texture coordinate.
flipYCoordinate  Boolean  (Optional)
Invert/flip the Y texture coordinate.
flipBackwardFacingXCoordinate  Boolean  (Optional)
Invert/flip the X texture coordinate on positions with backwards-facing normals. This for example allows creating texture coordinates for displaying text that can be read on both sides of the object.
See Also