Table of Contents

Class GeometricPrimitive.Sphere

Namespace
Stride.Graphics.GeometricPrimitives
Assembly
Stride.Graphics.dll

A sphere primitive.

public static class GeometricPrimitive.Sphere
Inheritance
GeometricPrimitive.Sphere

Methods

New(GraphicsDevice, float, int, float, float, bool)

Creates a sphere primitive.

public static GeometricPrimitive New(GraphicsDevice device, float radius = 0.5, int tessellation = 16, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

device GraphicsDevice

The device.

radius float

The radius.

tessellation int

The tessellation.

uScale float

The u scale.

vScale float

The v scale.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

Returns

GeometricPrimitive

A sphere primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;Must be >= 3

New(float, int, float, float, bool)

Creates a sphere primitive.

public static GeometricMeshData<VertexPositionNormalTexture> New(float radius = 0.5, int tessellation = 16, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

radius float

The radius.

tessellation int

The tessellation.

uScale float

The u scale.

vScale float

The v scale.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A sphere primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;Must be >= 3