Table of Contents

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
object
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, float vScale, bool toLeftHanded)

Parameters

size Vector3

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cube.

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

size Vector3

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

subdivisions int

The number of cuts added along each edge of a face. Negative values are treated as 0.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cube.

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

device GraphicsDevice

The device.

size Vector3

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices 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

device GraphicsDevice

The device.

size Vector3

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

subdivisions int

The 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

device GraphicsDevice

The device.

size float

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices 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

device GraphicsDevice

The device.

size float

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

subdivisions int

The 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

size float

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cube.

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

size float

The size.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

subdivisions int

The number of cuts added along each edge of a face. Negative values are treated as 0.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cube.