23 |
|
int fl; /* flags of what we're storing */ |
24 |
|
OBJECT obj; /* mesh triangle ID */ |
25 |
|
FVECT vn[3]; /* normals */ |
26 |
< |
FLOAT vc[3][2]; /* uv coords. */ |
26 |
> |
RREAL vc[3][2]; /* uv coords. */ |
27 |
|
} TRIDATA; |
28 |
|
|
29 |
|
#define tdsize(fl) ((fl)&MT_UV ? sizeof(TRIDATA) : \ |
30 |
< |
(fl)&MT_N ? sizeof(TRIDATA)-6*sizeof(FLOAT) : \ |
30 |
> |
(fl)&MT_N ? sizeof(TRIDATA)-6*sizeof(RREAL) : \ |
31 |
|
sizeof(int)+sizeof(OBJECT)) |
32 |
|
|
33 |
|
#define OMARGIN (10*FTINY) /* margin around global cube */ |
74 |
|
int n; |
75 |
|
FVECT *vp; |
76 |
|
FVECT *vn; |
77 |
< |
FLOAT (*vc)[2]; |
77 |
> |
RREAL (*vc)[2]; |
78 |
|
{ |
79 |
|
int tcnt = 0; |
80 |
|
int flags; |
81 |
< |
FLOAT *tn[3], *tc[3]; |
81 |
> |
RREAL *tn[3], *tc[3]; |
82 |
|
int *ord; |
83 |
|
int i, j; |
84 |
|
|
133 |
|
static void |
134 |
|
add2bounds(vp, vc) /* add point and uv coordinate to bounds */ |
135 |
|
FVECT vp; |
136 |
< |
FLOAT vc[2]; |
136 |
> |
RREAL vc[2]; |
137 |
|
{ |
138 |
|
register int j; |
139 |
|
|
159 |
|
OBJECT mo; |
160 |
|
FVECT vp1, vp2, vp3; |
161 |
|
FVECT vn1, vn2, vn3; |
162 |
< |
FLOAT vc1[2], vc2[2], vc3[2]; |
162 |
> |
RREAL vc1[2], vc2[2], vc3[2]; |
163 |
|
{ |
164 |
|
static OBJECT fobj = OVOID; |
165 |
|
char buf[32]; |
184 |
|
sprintf(buf, "t%d", fobj); |
185 |
|
fop->oname = savqstr(buf); |
186 |
|
fop->oargs.nfargs = 9; |
187 |
< |
fop->oargs.farg = (FLOAT *)malloc(9*sizeof(FLOAT)); |
187 |
> |
fop->oargs.farg = (RREAL *)malloc(9*sizeof(RREAL)); |
188 |
|
if (fop->oargs.farg == NULL) |
189 |
|
goto nomem; |
190 |
|
} else { /* else reuse failed one */ |