| 87 |
|
} |
| 88 |
|
|
| 89 |
|
|
| 90 |
– |
illumout(il, ob) /* print illum object */ |
| 91 |
– |
register struct illum_args *il; |
| 92 |
– |
OBJREC *ob; |
| 93 |
– |
{ |
| 94 |
– |
double cout[3]; |
| 95 |
– |
|
| 96 |
– |
printf("\n%s%s %s %s", il->matname, DSTSUF, |
| 97 |
– |
ofun[il->flags&IL_LIGHT?MAT_LIGHT:MAT_ILLUM].funame, |
| 98 |
– |
il->matname); |
| 99 |
– |
if (il->flags & IL_LIGHT || !strcmp(il->altmat,VOIDID)) |
| 100 |
– |
printf("\n0"); |
| 101 |
– |
else |
| 102 |
– |
printf("\n1 %s", il->altmat); |
| 103 |
– |
if (il->flags & IL_COLAVG) { |
| 104 |
– |
cout[0] = il->col[0]; |
| 105 |
– |
cout[1] = il->col[1]; |
| 106 |
– |
cout[2] = il->col[2]; |
| 107 |
– |
} else { |
| 108 |
– |
cout[0] = cout[1] = cout[2] = brt(il->col); |
| 109 |
– |
} |
| 110 |
– |
if (il->flags & IL_LIGHT) |
| 111 |
– |
printf("\n3 %f %f %f\n", cout[0], cout[1], cout[2]); |
| 112 |
– |
else |
| 113 |
– |
printf("\n4 %f %f %f 0\n", cout[0], cout[1], cout[2]); |
| 114 |
– |
|
| 115 |
– |
printobj(il->matname, ob); |
| 116 |
– |
} |
| 117 |
– |
|
| 118 |
– |
|
| 90 |
|
flatout(il, da, n, m, u, v, w) /* write hemispherical distribution */ |
| 91 |
|
struct illum_args *il; |
| 92 |
|
float *da; |
| 96 |
|
FILE *dfp; |
| 97 |
|
int i; |
| 98 |
|
|
| 128 |
– |
average(il, da, n*m); |
| 99 |
|
if (il->flags & IL_COLDST) { |
| 100 |
|
printf("\n%s %s %s%s", VOIDID, ofun[PAT_CDATA].funame, |
| 101 |
|
il->matname, DSTSUF); |
| 134 |
|
FILE *dfp; |
| 135 |
|
int i; |
| 136 |
|
|
| 167 |
– |
average(il, da, n*m); |
| 137 |
|
if (il->flags & IL_COLDST) { |
| 138 |
|
printf("\n%s %s %s%s", VOIDID, ofun[PAT_CDATA].funame, |
| 139 |
|
il->matname, DSTSUF); |
| 158 |
|
printf("\n\t%s il_alt il_azi", FNCFNM); |
| 159 |
|
printf("\n0\n0\n"); |
| 160 |
|
il->dfnum++; |
| 161 |
+ |
} |
| 162 |
+ |
|
| 163 |
+ |
|
| 164 |
+ |
illumout(il, ob) /* print illum object */ |
| 165 |
+ |
register struct illum_args *il; |
| 166 |
+ |
OBJREC *ob; |
| 167 |
+ |
{ |
| 168 |
+ |
double cout[3]; |
| 169 |
+ |
|
| 170 |
+ |
if (il->sampdens <= 0) |
| 171 |
+ |
printf("\n%s ", VOIDID); |
| 172 |
+ |
else |
| 173 |
+ |
printf("\n%s%s ", il->matname, DSTSUF); |
| 174 |
+ |
printf("%s %s", ofun[il->flags&IL_LIGHT?MAT_LIGHT:MAT_ILLUM].funame, |
| 175 |
+ |
il->matname); |
| 176 |
+ |
if (il->flags & IL_LIGHT || !strcmp(il->altmat,VOIDID)) |
| 177 |
+ |
printf("\n0"); |
| 178 |
+ |
else |
| 179 |
+ |
printf("\n1 %s", il->altmat); |
| 180 |
+ |
if (il->flags & IL_COLAVG) { |
| 181 |
+ |
cout[0] = il->col[0]; |
| 182 |
+ |
cout[1] = il->col[1]; |
| 183 |
+ |
cout[2] = il->col[2]; |
| 184 |
+ |
} else { |
| 185 |
+ |
cout[0] = cout[1] = cout[2] = brt(il->col); |
| 186 |
+ |
} |
| 187 |
+ |
printf("\n0\n3 %f %f %f\n", cout[0], cout[1], cout[2]); |
| 188 |
+ |
|
| 189 |
+ |
printobj(il->matname, ob); |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
|