Click or drag to resize
Ab4d.SharpEngine logo

MeshFactoryCreateCircleMesh(Vector3, Vector3, Vector3, Single, Int32, CircleTextureMappingTypes, Single, Single, String) Method

Create a 3D mesh representing a flat 2D circle.

Namespace: Ab4d.SharpEngine.Meshes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntax
C#
public static StandardMesh CreateCircleMesh(
	Vector3 centerPosition,
	Vector3 normal,
	Vector3 upDirection,
	float radius,
	int segments,
	CircleTextureMappingTypes textureMapping,
	float startAngle = 0f,
	float heightScaleFactor = 1f,
	string? name = null
)

Parameters

centerPosition  Vector3
Position of the circle's center.
normal  Vector3
Direction of the normal vector (perpendicular to circle's surface).
upDirection  Vector3
Direction of vector along the circle's surface (the up vector of the 2D shape).
radius  Single
Radius of the circle.
segments  Int32
Number of segments/points comprising the circle's edge.
textureMapping  CircleTextureMappingTypes
defines how the texture coordinates are defined for this circle
startAngle  Single  (Optional)
start angle in degrees that specified the start angle of the first position. This is useful for meshes with low segments count, for example when segments count is 4, the angle may be set to 45 to get a rectangle that is aligned with axes. Default value is 0 (starts at x=0 and y=radius)
heightScaleFactor  Single  (Optional)
can be used to produce an ellipse by scaling the height dimension of the circle. Default value is 1 that produces a circle.
name  String  (Optional)
Mesh name (for debug purposes).

Return Value

StandardMesh
StandardMesh with filled vertices array and index array.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when attempting to create circle with fewer than 3 segments (edge points).
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Meshes.MeshFactory.CreateCircleMesh(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Single,System.Int32,Ab4d.SharpEngine.Common.CircleTextureMappingTypes,System.Single,System.Single,System.String)"]

See Also