Class GeometricPrimitive.Cube
- Namespace
- Stride.Graphics.GeometricPrimitives
- Assembly
- Stride.Graphics.dll
A cube has six faces, each one pointing in a different direction.
public static class GeometricPrimitive.Cube
- Inheritance
-
GeometricPrimitive.Cube
Methods
New(Vector3, float, float, bool)
Creates a cube with six faces each one pointing in a different direction.
public static GeometricMeshData<VertexPositionNormalTexture> New(Vector3 size, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
size
Vector3The size.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.
Returns
New(GraphicsDevice, Vector3, float, float, bool)
Creates a cube with six faces each one pointing in a different direction.
public static GeometricPrimitive New(GraphicsDevice device, Vector3 size, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
device
GraphicsDeviceThe device.
size
Vector3The size.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.
Returns
- GeometricPrimitive
A cube.
New(GraphicsDevice, float, float, float, bool)
Creates a cube with six faces each one pointing in a different direction.
public static GeometricPrimitive New(GraphicsDevice device, float size = 1, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
device
GraphicsDeviceThe device.
size
floatThe size.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.
Returns
- GeometricPrimitive
A cube.
New(float, float, float, bool)
Creates a cube with six faces each one pointing in a different direction.
public static GeometricMeshData<VertexPositionNormalTexture> New(float size = 1, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
size
floatThe size.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.