64 |
|
FVECT uva[2]; /* tangent axes */ |
65 |
|
int ntris; /* number of triangles */ |
66 |
|
struct ptri { |
67 |
< |
float afrac; /* fraction of total area */ |
67 |
> |
double afrac; /* fraction of total area */ |
68 |
|
short vndx[3]; /* vertex indices */ |
69 |
|
} tri[1]; /* triangle array (extends struct) */ |
70 |
|
} POLYTRIS; /* triangulated polygon */ |
138 |
|
|
139 |
|
if (ac-- <= 0) |
140 |
|
return(NULL); |
141 |
+ |
if (verbose < 0) { /* turn off warnings */ |
142 |
+ |
strcpy(cp, "-w- "); |
143 |
+ |
cp += 4; |
144 |
+ |
} |
145 |
|
while (ac-- > 0) { |
146 |
|
strcpy(cp, *av++); |
147 |
|
while (*cp) cp++; |
606 |
|
sp->priv = (void *)ptp; |
607 |
|
} |
608 |
|
/* pick triangle by partial area */ |
609 |
< |
for (i = 0; i < ptp->ntris && x > ptp->tri[i].afrac; i++) |
609 |
> |
for (i = 0; i < ptp->ntris-1 && x > ptp->tri[i].afrac; i++) |
610 |
|
x -= ptp->tri[i].afrac; |
611 |
|
SDmultiSamp(samp2, 2, x/ptp->tri[i].afrac); |
612 |
|
samp2[0] *= samp2[1] = sqrt(samp2[1]); |
1309 |
|
fputs(": -i, -I supported for pass-through only\n", stderr); |
1310 |
|
return(1); |
1311 |
|
} |
1312 |
< |
fmtopt[2] = (sizeof(RREAL)==sizeof(double)) ? 'd' : 'f'; |
1312 |
> |
#ifdef SMLFLT |
1313 |
> |
fmtopt[2] = 'f'; |
1314 |
> |
#else |
1315 |
> |
fmtopt[2] = 'd'; |
1316 |
> |
#endif |
1317 |
|
if (sampcnt <= 0) sampcnt = 10000; |
1318 |
|
} |
1319 |
|
sprintf(sampcntbuf, "%d", sampcnt); |