Function leveladdshape
#include <macawlevel.h>int leveladdshape(
int level,
const float *planes,
int n,
const char **tex
);
Adds a convex brush of any shape, such as a wedge or a ramp, made of flat sides (planes). The brush is the space inside all of them.
Parameters
levelint- The level to add it to.
planesconst float *- Four
floats for each plane,nx ny nz d; inside is wherenx*x + ny*y + nz*z <= d, so the normal points out. nint- How many planes, from 4 to 320.
texconst char **- An array of
ntexture names, one a plane; NULL, or a NULL name, means"stone".
Returns int
The new brush's number, or -1 if it couldn't be added (too few planes, or a bad one).
In Building from code: brushes, with levelbrushcount, leveladdbox, levelremovebrush, levelbrushbox, levelbrushtexture, levelbrushwater, levelbrushglow, levelbrushshine.