Macaw OS C reference

Function cube3d

#include <macaw3d.h>
int cube3d(double w, double h, double d, int texture, double tiles);

Makes a box mesh, seen from outside, centred on 0, 0, 0.

Parameters

wdouble
How wide it is across x, in world units.
hdouble
How tall it is.
ddouble
How deep it is along z.
textureint
The picture on every face. Give a real picture: with 0 nothing is drawn.
tilesdouble
How many times the texture repeats across each face. 0: once for every unit. Less than 0: once a face.

Returns int

The new mesh's number.

In Making meshes, with cube3dsides, room3d, loadobj, mesh3d.