1 // $Header: x:/prj/tech/libsrc/g2/RCS/plyparam.h 1.5 1998/04/28 14:29:16 KEVIN Exp $
10 #define G2C_NUM_POLY_COORD 8
12 typedef struct g2s_poly_params g2s_poly_params
;
14 typedef void (g2il_func
)(g2s_raster
*r
, g2s_poly_params
*p
);
15 typedef void (g2raster_func
)(g2s_poly_params
*p
, int num_scanlines
);
16 typedef void (g2edge_func
)(g2s_point
*prev
, g2s_point
*next
, g2s_poly_params
*p
);
17 typedef int (g2poly_func
)(int n
, g2s_point
**ppl
);
18 typedef void (g2grad_func
)(g2s_point
*p0
, g2s_point
*p1
, g2s_point
*p2
, g2s_poly_params
*p
);
20 typedef struct g2s_raster_list
{
27 typedef struct left_edge
{
29 ulong x_frac
, dx_frac
;
30 fix coord_val
[G2C_NUM_POLY_COORD
];
31 fix coord_delta
[G2C_NUM_POLY_COORD
];
34 typedef struct right_edge
{
38 struct g2s_poly_params
{
39 g2s_raster_list raster_list
;
52 gdupix_func
*pix_func
;
53 gdulin_func
*hline_func
;
55 gdlpix_func
*lpix_func
;
56 union { // coordinate gradients wrt canvas x (dc/dx)
57 fix dcx
[G2C_NUM_POLY_COORD
];
58 // first five coords are intensity, texture u, texture v, haze, dryness
60 fix dix
, dux
, dvx
, dhx
, ddx
;
63 union { // coordinate gradients wrt canvas y (dc/dy)
64 fix dcy
[G2C_NUM_POLY_COORD
];
66 fix diy
, duy
, dvy
, dhy
, ddy
;
69 union { // Scale factor for each coordinate; Applied when calculating gradients.
70 float scale
[G2C_NUM_POLY_COORD
];
72 float i_scale
, u_scale
, v_scale
, h_scale
, d_scale
;
77 g2il_func
*inner_loop
;
78 g2raster_func
*raster_func
;
79 g2edge_func
*left_edge_func
;
80 g2edge_func
*right_edge_func
;
81 g2poly_func
*poly_func
;
82 g2grad_func
*grad_func
;
84 int ytop
, yright
, yleft
;