| MeshHelperCreateIcosphere 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.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static Submesh CreateIcosphere(
GraphicsDevice graphicsDevice,
int numberOfSubdivisions
)
Public Shared Function CreateIcosphere (
graphicsDevice As GraphicsDevice,
numberOfSubdivisions As Integer
) As Submesh
public:
static Submesh^ CreateIcosphere(
GraphicsDevice^ graphicsDevice,
int numberOfSubdivisions
)
static member CreateIcosphere :
graphicsDevice : GraphicsDevice *
numberOfSubdivisions : int -> Submesh
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:
SubmeshA new
Submesh that represents an icosphere.
Exceptions Remarks See Also