1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
15 |
|
#include "color.h" |
16 |
|
|
17 |
|
|
18 |
– |
typedef double FVECT[3]; |
19 |
– |
|
18 |
|
typedef struct ambval { |
19 |
< |
FVECT pos; /* position in space */ |
20 |
< |
FVECT dir; /* normal direction */ |
19 |
> |
float pos[3]; /* position in space */ |
20 |
> |
float dir[3]; /* normal direction */ |
21 |
|
int lvl; /* recursion level of parent ray */ |
22 |
|
float weight; /* weight of parent ray */ |
23 |
|
COLOR val; /* computed ambient value */ |
103 |
|
for ( ; ; ) { |
104 |
|
if (!dataonly) |
105 |
|
fscanf(fp, "%*s"); |
106 |
< |
if (fscanf(fp, "%lf %lf %lf", |
106 |
> |
if (fscanf(fp, "%f %f %f", |
107 |
|
&av.pos[0], &av.pos[1], &av.pos[2]) != 3) |
108 |
|
return; |
109 |
|
if (!dataonly) |
110 |
|
fscanf(fp, "%*s"); |
111 |
< |
if (fscanf(fp, "%lf %lf %lf", |
111 |
> |
if (fscanf(fp, "%f %f %f", |
112 |
|
&av.dir[0], &av.dir[1], &av.dir[2]) != 3) |
113 |
|
return; |
114 |
|
if (!dataonly) |