Defines | |
#define | CLIP_DOTPROD(K, A, B, C, D) |
#define | POLY_CLIP(PLANE, A, B, C, D) |
#define | LINE_CLIP(PLANE, A, B, C, D) |
Functions | |
static void TAG() | clip_draw_line (GLcontext *ctx, TNL_VERTEX *I, TNL_VERTEX *J, GLuint mask) |
static void TAG() | clip_draw_triangle (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1, TNL_VERTEX *v2, GLuint mask) |
static __inline void TAG() | draw_triangle (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1, TNL_VERTEX *v2) |
static __inline void TAG() | draw_line (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1) |
#define CLIP_DOTPROD | ( | K, | |||
A, | |||||
B, | |||||
C, | |||||
D | ) |
#define LINE_CLIP | ( | PLANE, | |||
A, | |||||
B, | |||||
C, | |||||
D | ) |
Value:
do { \ if (mask & PLANE) { \ GLfloat dpI = CLIP_DOTPROD( I, A, B, C, D ); \ GLfloat dpJ = CLIP_DOTPROD( J, A, B, C, D ); \ \ if (DIFFERENT_SIGNS(dpI, dpJ)) { \ TNL_VERTEX *O = verts++; \ if (NEGATIVE(dpJ)) { \ GLfloat t = dpI / (dpI - dpJ); \ INTERP( ctx, t, O, I, J ); \ J = O; \ } else { \ GLfloat t = dpJ / (dpJ - dpI); \ INTERP( ctx, t, O, J, I ); \ I = O; \ } \ } \ else if (NEGATIVE(dpI)) \ return; \ } \ } while (0)
#define POLY_CLIP | ( | PLANE, | |||
A, | |||||
B, | |||||
C, | |||||
D | ) |
static void TAG() clip_draw_line | ( | GLcontext * | ctx, | |
TNL_VERTEX * | I, | |||
TNL_VERTEX * | J, | |||
GLuint | mask | |||
) | [static] |
static void TAG() clip_draw_triangle | ( | GLcontext * | ctx, | |
TNL_VERTEX * | v0, | |||
TNL_VERTEX * | v1, | |||
TNL_VERTEX * | v2, | |||
GLuint | mask | |||
) | [static] |
static __inline void TAG() draw_triangle | ( | GLcontext * | ctx, | |
TNL_VERTEX * | v0, | |||
TNL_VERTEX * | v1, | |||
TNL_VERTEX * | v2 | |||
) | [static] |