Click or drag to resize
DigitalRuneMeshHelperCreateTorus Method
Creates a new submesh that represents a torus using triangles. (The torus is centered at the origin.)

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Submesh CreateTorus(
	GraphicsDevice graphicsDevice,
	float radius,
	float thickness,
	int numberOfSegments
)

Parameters

graphicsDevice
Type: GraphicsDevice
The graphics device.
radius
Type: SystemSingle
The radius of the torus.
thickness
Type: SystemSingle
The thickness of the torus.
numberOfSegments
Type: SystemInt32
The number of segments. This parameter controls the detail of the mesh.

Return Value

Type: Submesh
A new Submesh that represents a torus.
Exceptions
ExceptionCondition
ArgumentNullExceptiongraphicsDevice is .
ArgumentOutOfRangeExceptionnumberOfSegments is less than or equal to 2.
See Also