Macaw OS C reference

Function newcylinder

#include <macaw3d.h>
int newcylinder(int segments, int texture, int capped);

Makes a cylinder with a radius of 1, from y = -1 to y = 1.

Parameters

segmentsint
How many flat sides it has round it. 0 or less: 16.
textureint
The picture to wrap round it. 0: plain light grey.
cappedint
1 to close the ends with flat discs, 0 to leave it an open tube.

Returns int

The new cylinder's number.

In Shapes, terrain and models, with newcube, newsphere, newcone, newplane, newterrain, newterrainfn, newmesh, newmodel, newsprite, newpivot.