Cube

Sealed shape drawer that renders solid cuboids using the Shapes library. Contains the nested Cube readonly struct for storing cube parameters (center, rotation, size, color, thickness).

Definition

Namespace: Paragon.Core.ShapesDrawer Assembly: Paragon.dll

public sealed class CubeDrawer : ShapeDrawer<CubeDrawer.Cube>

Inheritance: ShapeDrawer<Cube> → CubeDrawer

Methods

Add

Enqueues a solid cube for rendering this frame.

public void Add(Vector3 center, Quaternion rotation, Vector3 size, Color color, float thickness = 1f)
Parameter
Type
Default
Description

center

Vector3

Cube center position

rotation

Quaternion

Cube orientation

size

Vector3

Cube dimensions (width, height, depth)

color

Color

Cube color

thickness

float

1f

Thickness

Draw

Renders all queued cubes. Sets Shapes.Draw.Thickness per cube, then calls Shapes.Draw.Cuboid() for each entry.

circle-info

Unlike line-based drawers, CubeDrawer does not apply lineGeometry or thicknessSpace — it sets Thickness per-cube individually since Cuboid uses its own thickness handling.

Cube Struct

Readonly struct holding all parameters for a single cube draw call.

See Also

Last updated