ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/data.h
(Generate patch)

Comparing ray/src/rt/data.h (file contents):
Revision 1.2 by greg, Tue Apr 3 17:24:33 1990 UTC vs.
Revision 2.7 by greg, Fri Jun 27 06:53:22 2003 UTC

# Line 1 | Line 1
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  MAXDIM         8               /* maximum dimensions for data array */
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  
15 #define  DSCANF         "%f"            /* scan format for DATATYPE */
16
16   typedef struct datarray {
17          char  *name;                    /* name of our data */
18 <        int  nd;                        /* number of dimensions */
18 >        short  type;                    /* DATATY, RED, GRN or BLU */
19 >        short  nd;                      /* number of dimensions */
20          struct {
21 <                double  org, siz;               /* coordinate domain */
21 >                DATATYPE  org, siz;             /* coordinate domain */
22                  int  ne;                        /* number of elements */
23 <                double  *p;                     /* point locations */
24 <        } dim[MAXDIM];                  /* dimension specifications */
25 <        DATATYPE  *arr;                 /* the data */
23 >                DATATYPE  *p;                   /* point locations */
24 >        } dim[MAXDDIM];                 /* dimension specifications */
25 >        union {
26 >                DATATYPE  *d;                   /* float data */
27 >                COLR  *c;                       /* RGB data */
28 >        }  arr;                         /* the data */
29          struct datarray  *next;         /* next array in list */
30   } DATARRAY;                     /* a data array */
31  
29 extern DATARRAY  *getdata(), *getpict();
32  
33 < extern double  datavalue();
33 > extern DATARRAY *getdata(char *dname);
34 > extern DATARRAY *getpict(char *pname);
35 > extern void     freedata(DATARRAY *dta);
36 > extern double   datavalue(DATARRAY *dp, double *pt);
37 >
38 >
39 > #ifdef __cplusplus
40 > }
41 > #endif
42 > #endif /* _RAD_DATA_H_ */
43 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines