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

Comparing ray/src/common/object.h (file contents):
Revision 2.1 by greg, Tue Nov 12 16:55:32 1991 UTC vs.
Revision 2.11 by greg, Wed Mar 12 04:59:04 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   *  object.h - header file for routines using objects and object sets.
7 *
8 *     7/28/85
4   */
5  
6 + #include "copyright.h"
7 +
8 + #ifndef  OCTREE
9 + #define  OCTREE         int
10 + #endif
11 +
12   /*
13   *      Object definitions require general specifications
14   *      which may include a number of different argument types.
# Line 36 | Line 37 | typedef struct {
37  
38   #ifndef  OBJECT
39   #ifdef  BIGMEM
40 < #define  OBJECT         int             /* index to object array */
40 > #define  OBJECT         int4            /* index to object array */
41   #else
42 < #define  OBJECT         short           /* index to object array */
42 > #define  OBJECT         int2            /* index to object array */
43   #endif
44   #endif
45  
# Line 48 | Line 49 | typedef struct {
49          char  *oname;                   /* object name */
50          FUNARGS  oargs;                 /* object specification */
51          char  *os;                      /* object structure */
51        long  lastrno;                  /* last ray this was used with */
52   }  OBJREC;
53  
54   #ifndef  MAXOBJBLK
55   #ifdef  BIGMEM
56 < #define  MAXOBJBLK      4095            /* maximum number of object blocks */
56 > #define  MAXOBJBLK      65535           /* maximum number of object blocks */
57   #else
58 < #define  MAXOBJBLK      511             /* maximum number of object blocks */
58 > #define  MAXOBJBLK      63              /* maximum number of object blocks */
59   #endif
60   #endif
61  
62   extern OBJREC  *objblock[MAXOBJBLK];    /* the object blocks */
63   extern OBJECT  nobjects;                /* # of objects */
64  
65 < #define  objptr(obj)    (objblock[(obj)>>6]+((obj)&077))
65 > #define  OBJBLKSHFT     9
66 > #define  OBJBLKSIZ      (1<<OBJBLKSHFT) /* object block size */
67 > #define  objptr(obj)    (objblock[(obj)>>OBJBLKSHFT]+((obj)&(OBJBLKSIZ-1)))
68  
69   #define  OVOID          (-1)            /* void object */
70   #define  VOIDID         "void"          /* void identifier */
# Line 72 | Line 74 | extern OBJECT  nobjects;               /* # of objects */
74   *  the objects in ascending order.
75   */
76  
77 < #define  MAXSET         127             /* maximum object set size */
77 > #define  MAXSET         511             /* maximum object set size */
78 >
79 > #define setfree(os)     free((void *)(os))
80 >
81 > extern void  (*addobjnotify[])();        /* people to notify of new objects */
82 >
83 > #ifdef NOPROTO
84 >
85 > extern OBJECT   objndx();
86 > extern OBJECT   lastmod();
87 > extern OBJECT   modifier();
88 > extern OBJECT   object();
89 > extern void     insertobject();
90 > extern void     clearobjndx();
91 > extern void     insertelem();
92 > extern void     deletelem();
93 > extern int      inset();
94 > extern int      setequal();
95 > extern void     setcopy();
96 > extern OBJECT * setsave();
97 > extern void     setunion();
98 > extern void     setintersect();
99 > extern OCTREE   fullnode();
100 > extern void     objset();
101 > extern int      dosets();
102 > extern void     donesets();
103 > extern int      otype();
104 > extern void     objerror();
105 > extern int      readfargs();
106 > extern void     freefargs();
107 > extern void     readobj();
108 > extern void     getobject();
109 > extern OBJECT   newobject();
110 > extern void     freeobjects();
111 > extern int      free_os();
112 >
113 > #else
114 >                                        /* defined in modobject.c */
115 > extern OBJECT   objndx(OBJREC *op);
116 > extern OBJECT   lastmod(OBJECT obj, char *mname);
117 > extern OBJECT   modifier(char *name);
118 > extern OBJECT   object(char *oname);
119 > extern void     insertobject(OBJECT obj);
120 > extern void     clearobjndx(void);
121 >                                        /* defined in objset.c */
122 > extern void     insertelem(OBJECT *os, OBJECT obj);
123 > extern void     deletelem(OBJECT *os, OBJECT obj);
124 > extern int      inset(OBJECT *os, OBJECT obj);
125 > extern int      setequal(OBJECT *os1, OBJECT *os2);
126 > extern void     setcopy(OBJECT *os1, OBJECT *os2);
127 > extern OBJECT * setsave(OBJECT *os);
128 > extern void     setunion(OBJECT *osr, OBJECT *os1, OBJECT *os2);
129 > extern void     setintersect(OBJECT *osr, OBJECT *os1, OBJECT *os2);
130 > extern OCTREE   fullnode(OBJECT *oset);
131 > extern void     objset(OBJECT *oset, OCTREE ot);
132 > extern int      dosets(int (*f)());
133 > extern void     donesets(void);
134 >
135 >                                        /* defined in otypes.c */
136 > extern int      otype(char *ofname);
137 > extern void     objerror(OBJREC *o, int etyp, char *msg);
138 >                                        /* defined in readfargs.c */
139 > extern int      readfargs(FUNARGS *fa, FILE *fp);
140 > extern void     freefargs(FUNARGS *fa);
141 >                                        /* defined in readobj.c */
142 > extern void     readobj(char *inpspec);
143 > extern void     getobject(char *name, FILE *fp);
144 > extern OBJECT   newobject();
145 > extern void     freeobjects(int firstobj, int nobjs);
146 >                                        /* defined in free_os.c */
147 > extern int      free_os(OBJREC *op);
148 >
149 > #endif /* NOPROTO */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines