# Sandbox.VertexBuffer.AddCube

## Overload 1

```csharp
void AddCube(Vector3 center, Vector3 size, Rotation rot, Color32 color = null)
```

Add a cube to the vertex buffer. Will include indices if they're enabled.

### Parameters

- `center` (`Vector3`)
- `size` (`Vector3`)
- `rot` (`Rotation`)
- `color` (`Color32`), default `null`

## Overload 2

```csharp
static void AddCube(VertexBuffer self, Vector3 center, Vector3 size, Rotation rot, Color32 color = null)
```

### Parameters

- `self` (`VertexBuffer`)
- `center` (`Vector3`)
- `size` (`Vector3`)
- `rot` (`Rotation`)
- `color` (`Color32`), default `null`

## Overload 3

```csharp
static void AddCube(VertexBuffer self, Vector3 center, Vector3 size, Rotation rot, Color32 color = null)
```

### Parameters

- `self` (`VertexBuffer`)
- `center` (`Vector3`)
- `size` (`Vector3`)
- `rot` (`Rotation`)
- `color` (`Color32`), default `null`

Declared in [Sandbox.VertexBuffer](/api/Sandbox.VertexBuffer).
Assembly: `Sandbox.Engine`.
