box()

Shape / 3D Primitives

Description

A box is an extruded rectangle. Use in P3D mode. A box with equal dimensions is a cube.

Syntax

void box(float size) void box(float w, float h, float d)

Parameters

NameTypeDescription
sizefloatdimension of the box in all directions
wfloatwidth
hfloatheight
dfloatdepth

Returns

void

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...