8 |
|
extern "C" { |
9 |
|
#endif |
10 |
|
|
11 |
– |
|
12 |
– |
#include "copyright.h" |
13 |
– |
|
11 |
|
#define MAXDDIM 5 /* maximum data dimensions */ |
12 |
|
|
13 |
|
#define DATATYPE float /* single precision to save space */ |
14 |
|
#define DATATY 'f' /* format for DATATYPE */ |
15 |
+ |
#define SPECTY 'c' /* format for SCOLR */ |
16 |
|
|
17 |
|
typedef struct datarray { |
18 |
|
char *name; /* name of our data */ |
19 |
< |
short type; /* DATATY, RED, GRN or BLU */ |
19 |
> |
short type; /* DATATY, SPECTY, RED, GRN or BLU */ |
20 |
|
short nd; /* number of dimensions */ |
21 |
|
struct { |
22 |
|
DATATYPE org, siz; /* coordinate domain */ |
25 |
|
} dim[MAXDDIM]; /* dimension specifications */ |
26 |
|
union { |
27 |
|
DATATYPE *d; /* float data */ |
28 |
< |
COLR *c; /* RGB data */ |
28 |
> |
COLR *c; /* RGBE data */ |
29 |
> |
uby8 *s; /* spectral data */ |
30 |
> |
void *p; /* generic pointer */ |
31 |
|
} arr; /* the data */ |
32 |
|
struct datarray *next; /* next array in list */ |
33 |
|
} DATARRAY; /* a data array */ |
35 |
|
|
36 |
|
extern DATARRAY *getdata(char *dname); |
37 |
|
extern DATARRAY *getpict(char *pname); |
38 |
+ |
extern DATARRAY *getspec(char *sname); |
39 |
|
extern void freedata(DATARRAY *dta); |
40 |
|
extern double datavalue(DATARRAY *dp, double *pt); |
41 |
|
|