| MeshHelperCreateTorus Method |
Creates a new submesh that represents a torus using triangles.
(The torus is centered at the origin.)
Namespace: DigitalRune.GraphicsAssembly: 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
)
Public Shared Function CreateTorus (
graphicsDevice As GraphicsDevice,
radius As Single,
thickness As Single,
numberOfSegments As Integer
) As Submesh
public:
static Submesh^ CreateTorus(
GraphicsDevice^ graphicsDevice,
float radius,
float thickness,
int numberOfSegments
)
static member CreateTorus :
graphicsDevice : GraphicsDevice *
radius : float32 *
thickness : float32 *
numberOfSegments : int -> Submesh
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:
SubmeshA new
Submesh that represents a torus.
Exceptions See Also