 |
MeshUtilsGenerateCylindricalTextureCoordinates(StandardMesh, NullableVector2, NullableVector2, Vector3, Vector3, Boolean) Method |
Generate texture coordinates for the given vertices and triangleIndices.
Texture coordinates are computed using cylindrical projection.
Texture coordinates for positions that are parallel to the cylinderDirectionVector use simple planar projection.
Texture coordinates for other positions are computed based on the angle from the cylinder center axis to the position.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntaxpublic static void GenerateCylindricalTextureCoordinates(
StandardMesh mesh,
Vector2? planeBoundsMin,
Vector2? planeBoundsMax,
Vector3 cylinderDirectionVector,
Vector3 cylinderPlaneHeightVector,
bool invertBottomYCoordinate = true
)
Parameters
- mesh StandardMesh
- StandardMesh that gets generated texture coordinates
- planeBoundsMin NullableVector2
- Optional minimum point of the 2D bounding box that defines the bounds of the cylinders top and bottom plane.
- planeBoundsMax NullableVector2
- Optional maximum point of the 2D bounding box that defines the bounds of the cylinders top and bottom plane.
- cylinderDirectionVector Vector3
- Direction vector of the cylinder (its upright / 3D height direction).
- cylinderPlaneHeightVector Vector3
- Direction vector along the cylinder's top and bottom planes (the 2D height direction of the 2D circle plane).
- invertBottomYCoordinate Boolean (Optional)
- Invert the bottom Y texture coordinate, for example to make the text on the bottom texture correctly oriented.
Return Value
Array of generated texture coordinates.
See Also