Anonymous
public text v1 · immutablestatic Bool
cubeCheckFTB (CompScreen *s,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform
int output)
{
CompTransform sTransform = *transform;
(*s->applyScreenTransform) (s, &sa, output, &sTransform);
float mvp[16];
MULTM(w->screen->projection, sTransform->m, mvp);
float pntA[4] = { 0.0,
0.0,
0.0, 1};
float pntB[4] = { 0.0,
0.0,
-0.1, 1};
MULTMV(mvp, pntA);
DIVV(pntA);
MULTMV(mvp, pntB);
DIVV(pntB);
if pntA[3] < pntB[3] return true
return FALSE;
}