ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/data.h
Revision: 2.6
Committed: Sat Jun 7 00:54:58 2003 UTC (20 years, 10 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.5: +12 -9 lines
Log Message:
Instrumented headers against multiple inclusion and for use from C++.
Removed NOPROTO sections.

File Contents

# User Rev Content
1 schorsch 2.6 /* RCSid $Id: data.h,v 2.5 2003/02/25 02:47:22 greg Exp $ */
2 greg 2.4 /*
3     * Header for data file loading and computation routines.
4     */
5 schorsch 2.6 #ifndef _RAD_DATA_H_
6     #define _RAD_DATA_H_
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10    
11 greg 1.1
12 greg 2.5 #include "copyright.h"
13 greg 1.1
14 greg 2.3 #define MAXDDIM 5 /* maximum data dimensions */
15 greg 1.1
16     #define DATATYPE float /* single precision to save space */
17 greg 2.2 #define DATATY 'f' /* format for DATATYPE */
18 greg 1.1
19     typedef struct datarray {
20     char *name; /* name of our data */
21 greg 2.3 short type; /* DATATY, RED, GRN or BLU */
22     short nd; /* number of dimensions */
23 greg 1.1 struct {
24 greg 2.3 DATATYPE org, siz; /* coordinate domain */
25 greg 1.1 int ne; /* number of elements */
26 greg 2.3 DATATYPE *p; /* point locations */
27 greg 1.3 } dim[MAXDDIM]; /* dimension specifications */
28 greg 2.3 union {
29     DATATYPE *d; /* float data */
30     COLR *c; /* RGB data */
31     } arr; /* the data */
32 greg 1.1 struct datarray *next; /* next array in list */
33     } DATARRAY; /* a data array */
34    
35 greg 2.4
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 greg 1.1
41 schorsch 2.6
42     #ifdef __cplusplus
43     }
44 greg 2.4 #endif
45 schorsch 2.6 #endif /* _RAD_DATA_H_ */
46