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.7 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.12 by greg, Tue Aug 16 18:09:53 2011 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 "bsdf.h"
21  
22  
23   /* KEEP THIS ROUTINE CONSISTENT WITH THE DIFFERENT OBJECT FUNCTIONS! */
24  
25  
26 < int
27 < load_os(op)                     /* load associated data for object */
28 < register OBJREC *op;
26 > extern int
27 > load_os(                        /* load associated data for object */
28 >        register OBJREC *op
29 > )
30   {
31          DATARRAY  *dp;
32  
# Line 43 | Line 44 | register OBJREC        *op;
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 96 | Line 100 | register OBJREC        *op;
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 120 | Line 130 | register OBJREC        *op;
130          return(0);
131   sargerr:
132          objerror(op, USER, "too few string arguments");
133 +        return 0; /* pro forma return */
134   }
135  
136  
137 < void
138 < preload_objs()          /* preload object data structures */
137 > extern void
138 > preload_objs(void)              /* preload object data structures */
139   {
140          register OBJECT on;
141                                  /* note that nobjects may change during loop */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines