Click or drag to resize
Ab4d.SharpEngine logo

MeshFactoryCreateTubeMesh(Vector3, Single, Single, Single, Int32, String) Method

Create an upright 3D tube mesh with same inner and outer radius at both ends. When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).

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

Parameters

bottomCenterPosition  Vector3
Bottom center position of the tube.
outerRadius  Single
Outer radius of the tube.
innerRadius  Single
Inner radius of the tube.
height  Single
Height of the tube.
segments  Int32
Number of segments comprising the tube's side surface.
name  String  (Optional)
Mesh name (for debug purposes).

Return Value

StandardMesh
StandardMesh with filled vertices array and index array.
Remarks

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

See Also