VectorToScreen(vec3_t vector, refdef_t refdef, vec3_t out, qboolean screenScale); //if screenScale is true the size of the refdef will be converted from the renderer screen size.
Alternatively you can use:
Code:
qboolean quickProject(vec3_t v, float *x, float *y); //The refdef is cg.refdef and it returns true if the point is visible on the screen. //Pass in a float pointer for *x and *y
This code also includes some other useful functions:
BoundingBoxPoints fills out nodes[8] with the 8 vectors that make up the box. ProjectBounds and ProjectRotatedBounds out *xv, *yv with the 8 projected values that make up the box. Pass in an 8 float array for *xv, *yv