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

Comparing ray/src/rt/preload.c (file contents):
Revision 2.8 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.13 by greg, Fri Nov 8 17:11:42 2013 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include "copyright.h"
11  
12 < #include "standard.h"
13 < #include "octree.h"
14 < #include "object.h"
12 > #include "ray.h"
13   #include "otypes.h"
14   #include "face.h"
15   #include "cone.h"
16   #include "instance.h"
17 < #include "color.h"
17 > #include "mesh.h"
18   #include "data.h"
19   #include "func.h"
20 < #include "ray.h"
20 > #include "bsdf.h"
21  
22  
23   /* KEEP THIS ROUTINE CONSISTENT WITH THE DIFFERENT OBJECT FUNCTIONS! */
24  
25  
26 < extern int
26 > int
27   load_os(                        /* load associated data for object */
28 <        register OBJREC *op
28 >        OBJREC  *op
29   )
30   {
31          DATARRAY  *dp;
# Line 46 | Line 44 | load_os(                       /* load associated data for object */
44          case OBJ_INSTANCE:      /* octree instance */
45                  getinstance(op, IO_ALL);
46                  return(1);
47 +        case OBJ_MESH:          /* mesh instance */
48 +                getmeshinst(op, IO_ALL);
49 +                return(1);
50          case PAT_CPICT:         /* color picture */
51                  if (op->oargs.nsargs < 4)
52                          goto sargerr;
# Line 99 | Line 100 | load_os(                       /* load associated data for object */
100          case MAT_BRTDF:         /* BRDTfunc material */
101                  getfunc(op, 9, 0x3f, 0);
102                  return(1);
103 +        case MAT_BSDF:          /* BSDF material */
104 +                if (op->oargs.nsargs < 6)
105 +                        goto sargerr;
106 +                getfunc(op, 5, 0x1d, 1);
107 +                loadBSDF(op->oargs.sarg[1]);
108 +                return(1);
109          case MAT_PDATA:         /* plastic BRDF data */
110          case MAT_MDATA:         /* metal BRDF data */
111          case MAT_TDATA:         /* trans BRDF data */
# Line 127 | Line 134 | sargerr:
134   }
135  
136  
137 < extern void
137 > void
138   preload_objs(void)              /* preload object data structures */
139   {
140 <        register OBJECT on;
140 >        OBJECT on;
141                                  /* note that nobjects may change during loop */
142          for (on = 0; on < nobjects; on++)
143                  load_os(objptr(on));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines