Click or drag to resize
Ab4d.SharpEngine logo

MeshFactoryCreateConeMesh Method

Create an upright cone mesh.

Namespace: Ab4d.SharpEngine.Meshes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntax
C#
public static StandardMesh CreateConeMesh(
	Vector3 bottomCenterPosition,
	float topRadius,
	float bottomRadius,
	float height,
	int segments,
	bool isSmooth,
	string? name = null
)

Parameters

bottomCenterPosition  Vector3
Position of the bottom-center point.
topRadius  Single
Radius of the top circle.
bottomRadius  Single
Radius of the bottom circle.
height  Single
Vertical size of the cone.
segments  Int32
Number of segments comprising the circles and the side surface.
isSmooth  Boolean
If true, side surface normals are computed so that the surface looks smooth. Otherwise, each segment of the side surface will appear pronounced and flat.
name  String  (Optional)
Mesh name (for debug purposes).

Return Value

StandardMesh
StandardMesh with filled vertices array and index array.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when number of segments is too low.
Remarks

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

See Also