| 1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
| 2 |
< |
|
| 3 |
< |
/* SCCSid "$SunId$ LBL" */ |
| 4 |
< |
|
| 1 |
> |
/* RCSid $Id$ */ |
| 2 |
|
/* |
| 3 |
< |
* data.h - header file for routines which interpolate data. |
| 7 |
< |
* |
| 8 |
< |
* 6/4/86 |
| 3 |
> |
* Header for data file loading and computation routines. |
| 4 |
|
*/ |
| 5 |
+ |
#ifndef _RAD_DATA_H_ |
| 6 |
+ |
#define _RAD_DATA_H_ |
| 7 |
+ |
#ifdef __cplusplus |
| 8 |
+ |
extern "C" { |
| 9 |
+ |
#endif |
| 10 |
|
|
| 11 |
– |
#define MAXDDIM 8 /* maximum dimensions for data array */ |
| 11 |
|
|
| 12 |
+ |
#include "copyright.h" |
| 13 |
+ |
|
| 14 |
+ |
#define MAXDDIM 5 /* maximum data dimensions */ |
| 15 |
+ |
|
| 16 |
|
#define DATATYPE float /* single precision to save space */ |
| 17 |
|
#define DATATY 'f' /* format for DATATYPE */ |
| 18 |
|
|
| 19 |
|
typedef struct datarray { |
| 20 |
|
char *name; /* name of our data */ |
| 21 |
< |
int nd; /* number of dimensions */ |
| 21 |
> |
short type; /* DATATY, RED, GRN or BLU */ |
| 22 |
> |
short nd; /* number of dimensions */ |
| 23 |
|
struct { |
| 24 |
< |
double org, siz; /* coordinate domain */ |
| 24 |
> |
DATATYPE org, siz; /* coordinate domain */ |
| 25 |
|
int ne; /* number of elements */ |
| 26 |
< |
double *p; /* point locations */ |
| 26 |
> |
DATATYPE *p; /* point locations */ |
| 27 |
|
} dim[MAXDDIM]; /* dimension specifications */ |
| 28 |
< |
DATATYPE *arr; /* the data */ |
| 28 |
> |
union { |
| 29 |
> |
DATATYPE *d; /* float data */ |
| 30 |
> |
COLR *c; /* RGB data */ |
| 31 |
> |
} arr; /* the data */ |
| 32 |
|
struct datarray *next; /* next array in list */ |
| 33 |
|
} DATARRAY; /* a data array */ |
| 34 |
|
|
| 28 |
– |
extern DATARRAY *getdata(), *getpict(); |
| 35 |
|
|
| 36 |
< |
extern double datavalue(); |
| 36 |
> |
extern DATARRAY *getdata(char *dname); |
| 37 |
> |
extern DATARRAY *getpict(char *pname); |
| 38 |
> |
extern void freedata(DATARRAY *dta); |
| 39 |
> |
extern double datavalue(DATARRAY *dp, double *pt); |
| 40 |
> |
|
| 41 |
> |
|
| 42 |
> |
#ifdef __cplusplus |
| 43 |
> |
} |
| 44 |
> |
#endif |
| 45 |
> |
#endif /* _RAD_DATA_H_ */ |
| 46 |
> |
|