Class GeometricPrimitive.Sphere
- Namespace
- Stride.Graphics.GeometricPrimitives
- Assembly
- Stride.Graphics.dll
A sphere primitive.
public static class GeometricPrimitive.Sphere
- Inheritance
-
objectGeometricPrimitive.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
deviceGraphicsDeviceThe device.
radiusfloatThe radius.
tessellationintThe tessellation.
uScalefloatThe u scale.
vScalefloatThe v scale.
toLeftHandedboolif set to
truevertices 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
radiusfloatThe radius.
tessellationintThe tessellation.
uScalefloatThe u scale.
vScalefloatThe v scale.
toLeftHandedboolif set to
truevertices and indices will be transformed to left handed. Default is false.
Returns
- GeometricMeshData<VertexPositionNormalTexture>
A sphere primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;Must be >= 3