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
sizeVector3The size.
uScalefloatScale U coordinates between 0 and the values of this parameter.
vScalefloatScale V coordinates 0 and the values of this parameter.
toLeftHandedboolif set to
truevertices 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
deviceGraphicsDeviceThe device.
sizeVector3The size.
uScalefloatScale U coordinates between 0 and the values of this parameter.
vScalefloatScale V coordinates 0 and the values of this parameter.
toLeftHandedboolif set to
truevertices 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
deviceGraphicsDeviceThe device.
sizefloatThe size.
uScalefloatScale U coordinates between 0 and the values of this parameter.
vScalefloatScale V coordinates 0 and the values of this parameter.
toLeftHandedboolif set to
truevertices 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
sizefloatThe size.
uScalefloatScale U coordinates between 0 and the values of this parameter.
vScalefloatScale V coordinates 0 and the values of this parameter.
toLeftHandedboolif set to
truevertices and indices will be transformed to left handed. Default is false.