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 |
> |
#include "paths.h" |
22 |
|
|
23 |
|
|
24 |
|
/* KEEP THIS ROUTINE CONSISTENT WITH THE DIFFERENT OBJECT FUNCTIONS! */ |
30 |
|
) |
31 |
|
{ |
32 |
|
DATARRAY *dp; |
33 |
+ |
SDData *sd; |
34 |
|
|
35 |
|
switch (op->otype) { |
36 |
|
case OBJ_FACE: /* polygon */ |
46 |
|
case OBJ_INSTANCE: /* octree instance */ |
47 |
|
getinstance(op, IO_ALL); |
48 |
|
return(1); |
49 |
+ |
case OBJ_MESH: /* mesh instance */ |
50 |
+ |
getmeshinst(op, IO_ALL); |
51 |
+ |
return(1); |
52 |
|
case PAT_CPICT: /* color picture */ |
53 |
|
if (op->oargs.nsargs < 4) |
54 |
|
goto sargerr; |
101 |
|
return(1); |
102 |
|
case MAT_BRTDF: /* BRDTfunc material */ |
103 |
|
getfunc(op, 9, 0x3f, 0); |
104 |
+ |
return(1); |
105 |
+ |
case MAT_BSDF: /* BSDF material */ |
106 |
+ |
if (op->oargs.nsargs < 6) |
107 |
+ |
goto sargerr; |
108 |
+ |
getfunc(op, 5, 0x1d, 1); |
109 |
+ |
sd = SDgetCache(op->oargs.sarg[1]); |
110 |
+ |
if (sd != NULL && !SDisLoaded(sd)) |
111 |
+ |
SDloadFile(sd, getpath(op->oargs.sarg[1], |
112 |
+ |
getrlibpath(), R_OK)); |
113 |
|
return(1); |
114 |
|
case MAT_PDATA: /* plastic BRDF data */ |
115 |
|
case MAT_MDATA: /* metal BRDF data */ |