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.1 by greg, Thu Feb 2 10:41:13 1989 UTC vs.
Revision 2.8 by greg, Wed Dec 13 23:26:16 2023 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 + #define  SPECTY         'c'             /* format for SCOLR */
16  
15 #define  DSCANF         "%f"            /* scan format for DATATYPE */
16
17   typedef struct datarray {
18          char  *name;                    /* name of our data */
19 <        int  nd;                        /* number of dimensions */
19 >        short  type;                    /* DATATY, SPECTY, RED, GRN or BLU */
20 >        short  nd;                      /* number of dimensions */
21          struct {
22 <                double  org, siz;               /* coordinate domain */
22 >                DATATYPE  org, siz;             /* coordinate domain */
23                  int  ne;                        /* number of elements */
24 <        } dim[MAXDIM];                  /* dimension specifications */
25 <        DATATYPE  *arr;                 /* the data */
24 >                DATATYPE  *p;                   /* point locations */
25 >        } dim[MAXDDIM];                 /* dimension specifications */
26 >        union {
27 >                DATATYPE  *d;                   /* float 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 */
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 DATARRAY *getspec(char *sname);
39 > extern void     freedata(DATARRAY *dta);
40 > extern double   datavalue(DATARRAY *dp, double *pt);
41 >
42 >
43 > #ifdef __cplusplus
44 > }
45 > #endif
46 > #endif /* _RAD_DATA_H_ */
47 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines