Click or drag to resize
DigitalRuneMeshHelperCreateIcosphere Method
Creates a new submesh that represents a sphere using triangles. (The sphere is centered at the origin. Radius = 1. The sphere is generated by subdividing an icosahedron.)

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Submesh CreateIcosphere(
	GraphicsDevice graphicsDevice,
	int numberOfSubdivisions
)

Parameters

graphicsDevice
Type: GraphicsDevice
The graphics device.
numberOfSubdivisions
Type: SystemInt32
The number of subdivisions [0, 5]. (See remarks of CreateIcosphere(Int32, Boolean).) This parameter controls the detail of the mesh.

Return Value

Type: Submesh
A new Submesh that represents an icosphere.
Exceptions
ExceptionCondition
ArgumentNullExceptiongraphicsDevice is .
ArgumentOutOfRangeExceptionnumberOfSubdivisions is less than 1.
Remarks
If the returned Submesh is not going to be modified, then it is better to call GetIcosphere(IGraphicsService) to retrieve a shared Submesh instance.
See Also