Click or drag to resize
Ab4d.SharpEngine logo

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

Create a 3D tube mesh with custom parametrization (i.e., height direction vector, start and end angle for the tube's side surface, separate radii settings for each end of the tube). 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,
	Vector3 heightDirection,
	float bottomOuterRadius,
	float bottomInnerRadius,
	float topOuterRadius,
	float topInnerRadius,
	float height,
	int segments,
	float startAngle = 0f,
	float endAngle = 360f,
	string? name = null
)

Parameters

bottomCenterPosition  Vector3
Bottom center position of the tube.
heightDirection  Vector3
Height direction vector.
bottomOuterRadius  Single
Outer radius of the tube at the bottom end.
bottomInnerRadius  Single
Inner radius of the tube at the bottom end.
topOuterRadius  Single
Outer radius of the tube at the top end.
topInnerRadius  Single
Inner radius of the tube at the top end.
height  Single
Height of the tube.
segments  Int32
Number of segments comprising the tube's side surface.
startAngle  Single  (Optional)
Start angle of the arc that defines the tube's side surface.
endAngle  Single  (Optional)
End angle of the arc that defines the tube's side surface.
name  String  (Optional)
Mesh name (for debug purposes).

Return Value

StandardMesh
StandardMesh with filled vertices array and index array.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when incompatible arguments are passed to the method.
Remarks

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

See Also