ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/object.h
Revision: 1.1
Committed: Thu Feb 2 10:34:17 1989 UTC (35 years, 3 months ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Initial revision

File Contents

# User Rev Content
1 greg 1.1 /* Copyright (c) 1986 Regents of the University of California */
2    
3     /* SCCSid "$SunId$ LBL" */
4    
5     /*
6     * object.h - header file for routines using objects and object sets.
7     *
8     * 7/28/85
9     */
10    
11     /*
12     * Object definitions require general specifications
13     * which may include a number of different argument types.
14     * The following structure aids in the storage of such
15     * argument lists.
16     */
17    
18     typedef struct {
19     short nsargs; /* # of string arguments */
20     short nfargs; /* # of real arguments */
21     char **sarg; /* string arguments */
22     double *farg; /* real arguments */
23     #ifdef IARGS
24     short niargs; /* # of integer arguments */
25     long *iarg; /* integer arguments */
26     #endif
27     } FUNARGS;
28    
29     #define MAXSTR 512 /* maximum string length */
30    
31     /*
32     * An object is defined as an index into an array of
33     * structures containing the object type and specification
34     * and the modifier index.
35     */
36    
37     typedef short OBJECT; /* index into object array */
38    
39     typedef struct {
40     OBJECT omod; /* modifier number */
41     short otype; /* object type number */
42     char *oname; /* object name */
43     FUNARGS oargs; /* object specification */
44     char *os; /* object structure */
45     long lastrno; /* last ray this was used with */
46     } OBJREC;
47    
48     #define MAXOBJBLK 511 /* maximum number of object blocks */
49    
50     extern OBJREC *objblock[MAXOBJBLK]; /* the object blocks */
51     extern int nobjects; /* # of objects */
52    
53     #define objptr(obj) (objblock[(obj)>>6]+((obj)&077))
54    
55     #define OVOID (-1) /* void object */
56     #define VOIDID "void" /* void identifier */
57    
58     /*
59     * Object sets begin with the number of objects and proceed with
60     * the objects in ascending order.
61     */
62    
63     #define MAXSET 127 /* maximum object set size */