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
GraphicsDeviceThe device.
radius
floatThe radius.
tessellation
intThe tessellation.
uScale
floatThe u scale.
vScale
floatThe v scale.
toLeftHanded
boolif 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
floatThe radius.
tessellation
intThe tessellation.
uScale
floatThe u scale.
vScale
floatThe v scale.
toLeftHanded
boolif 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