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
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 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.

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 = 1, float vScale = 1, bool toLeftHanded = false)

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.

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 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.

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 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.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cube.