ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/data.h
Revision: 2.5
Committed: Tue Feb 25 02:47:22 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 2.4: +2 -57 lines
Log Message:
Replaced inline copyright notice with #include "copyright.h"

File Contents

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