Click or drag to resize
AB4D logo

MeshUtilsGenerateCylindricalTextureCoordinates(MeshGeometry3D, Rect, Vector3D, Vector3D, Boolean) Method

Returns a TextureCoordinates for the specified mesh. TextureCoordinates are calculated with using the Cylindrical projection. TextureCoordinates for position that are parallel to the cylinderDirectionVector use simple planar projection. TextureCoordinates for other positions are calculated based on the angle from the cylinder center axis to the position. The GenerateCylindricalTextureCoordinates does not set the TextureCoordinates on the mesh.

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public static PointCollection GenerateCylindricalTextureCoordinates(
	MeshGeometry3D mesh,
	Rect planeBounds,
	Vector3D cylinderDirectionVector,
	Vector3D cylinderPlaneHeightVector,
	bool invertBottomYCoordinate = true
)

Parameters

mesh  MeshGeometry3D
MeshGeometry3D
planeBounds  Rect
Rect that defines the bounds for the cylinder up and bottom plane
cylinderDirectionVector  Vector3D
Vector3D that specifies the direction of the cylinder (its height direction)
cylinderPlaneHeightVector  Vector3D
Vector3D that specifies the direction of the height direction in the up and bottom cylinder plane
invertBottomYCoordinate  Boolean  (Optional)
when true (by default) the bottom Y texture coordinates are inverted to make the text on the bottom texture correctly oriented; false to make the bottom texture coordinates the same as on the top

Return Value

PointCollection
PointCollection with calculated TextureCoordinates
See Also