Function camproject3d
#include <macaw3d.h>int camproject3d(
int camera,
double x,
double y,
double z,
double *sx,
double *sy,
double *dist
);
Works out where a place in the world shows up in a camera's picture, for putting labels over things. It uses the size of the last picture the camera drew (320 by 200 before it has drawn one).
Parameters
cameraint- The camera's number.
xdouble- The place's position across, in world units.
ydouble- The place's height.
zdouble- The place's position along z.
sxdouble *- Where to put how far across the picture it is, in pixels: the address of a
double, like&sx. sydouble *- Where to put how far down the picture it is, in pixels: the address of a
double, like&sy. distdouble *- Where to put how far ahead of the camera it is, in world units: the address of a
double.
Returns int
1 if the place is in front of the camera, or 0 if it's behind (and nothing is written).
In Cameras, with fov3d, clscolor3d, camfog3d, campick3d.