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
-
objectGeometricPrimitive.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, float vScale, bool toLeftHanded)
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.
Returns
New(Vector3, float, float, bool, int)
Creates a cube with six faces each one pointing in a different direction, each face split into a grid.
public static GeometricMeshData<VertexPositionNormalTexture> New(Vector3 size, float uScale = 1, float vScale = 1, bool toLeftHanded = false, int subdivisions = 0)
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.subdivisionsintThe number of cuts added along each edge of a face. Negative values are treated as 0.
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, float vScale, bool toLeftHanded)
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.
Returns
- GeometricPrimitive
A cube.
New(GraphicsDevice, Vector3, float, float, bool, int)
Creates a cube with six faces each one pointing in a different direction, each face split into a grid.
public static GeometricPrimitive New(GraphicsDevice device, Vector3 size, float uScale = 1, float vScale = 1, bool toLeftHanded = false, int subdivisions = 0)
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.subdivisionsintThe number of cuts added along each edge of a face. Negative values are treated as 0.
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, float uScale, float vScale, bool toLeftHanded)
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.
Returns
- GeometricPrimitive
A cube.
New(GraphicsDevice, float, float, float, bool, int)
Creates a cube with six faces each one pointing in a different direction, each face split into a grid.
public static GeometricPrimitive New(GraphicsDevice device, float size = 1, float uScale = 1, float vScale = 1, bool toLeftHanded = false, int subdivisions = 0)
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.subdivisionsintThe number of cuts added along each edge of a face. Negative values are treated as 0.
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, float uScale, float vScale, bool toLeftHanded)
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.
Returns
New(float, float, float, bool, int)
Creates a cube with six faces each one pointing in a different direction, each face split into a grid.
public static GeometricMeshData<VertexPositionNormalTexture> New(float size = 1, float uScale = 1, float vScale = 1, bool toLeftHanded = false, int subdivisions = 0)
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.subdivisionsintThe number of cuts added along each edge of a face. Negative values are treated as 0.