--- ray/src/common/otypes.h 1992/01/04 19:51:21 2.2 +++ ray/src/common/otypes.h 1995/12/08 18:16:13 2.6 @@ -44,24 +44,25 @@ typedef struct { #define MAT_LIGHT 27 /* primary light source */ #define MAT_ILLUM 28 /* secondary light source */ #define MAT_SPOT 29 /* spot light source */ -#define MAT_MIRROR 30 /* mirror (secondary source) */ -#define MAT_TFUNC 31 /* trans brdf function */ -#define MAT_BRTDF 32 /* brtd function */ -#define MAT_PDATA 33 /* plastic brdf data */ -#define MAT_MDATA 34 /* metal brdf data */ -#define MAT_TDATA 35 /* trans brdf data */ -#define PAT_CFUNC 36 /* color function */ -#define MAT_CLIP 37 /* clipping surface */ -#define PAT_CDATA 38 /* color data */ -#define PAT_CTEXT 39 /* colored text */ -#define TEX_DATA 40 /* surface texture data */ -#define MIX_FUNC 41 /* mixing function */ -#define MIX_DATA 42 /* mixing data */ -#define MIX_TEXT 43 /* mixing text */ -#define MAT_DIRECT1 44 /* unidirecting material */ -#define MAT_DIRECT2 45 /* bidirecting material */ +#define MAT_MIST 30 /* mist medium */ +#define MAT_MIRROR 31 /* mirror (secondary source) */ +#define MAT_TFUNC 32 /* trans brdf function */ +#define MAT_BRTDF 33 /* brtd function */ +#define MAT_PDATA 34 /* plastic brdf data */ +#define MAT_MDATA 35 /* metal brdf data */ +#define MAT_TDATA 36 /* trans brdf data */ +#define PAT_CFUNC 37 /* color function */ +#define MAT_CLIP 38 /* clipping surface */ +#define PAT_CDATA 39 /* color data */ +#define PAT_CTEXT 40 /* colored text */ +#define TEX_DATA 41 /* surface texture data */ +#define MIX_FUNC 42 /* mixing function */ +#define MIX_DATA 43 /* mixing data */ +#define MIX_TEXT 44 /* mixing text */ +#define MAT_DIRECT1 45 /* unidirecting material */ +#define MAT_DIRECT2 46 /* bidirecting material */ /* number of object types */ -#define NUMOTYPE 46 +#define NUMOTYPE 47 /* type flags */ #define T_S 01 /* surface (object) */ #define T_M 02 /* material */ @@ -84,14 +85,14 @@ extern FUN ofun[]; /* our type list */ #define issurface(t) (ofun[t].flags & T_S) #define isvolume(t) (ofun[t].flags & T_V) -#define ismodifier(t) (!issurface(t)) +#define ismodifier(t) (!(ofun[t].flags & (T_S|T_V))) #define ismaterial(t) (ofun[t].flags & T_M) -#define istexture(t) (ofun[t].flags & (T_P|T_T|T_X)) #define islight(t) (ofun[t].flags & T_L) #define isvlight(t) (ofun[t].flags & T_LV) #define hasdata(t) (ofun[t].flags & (T_D|T_I)) #define hasfunc(t) (ofun[t].flags & (T_F|T_D|T_I)) #define hastext(t) (ofun[t].flags & T_E) +#define isflat(t) ((t)==OBJ_FACE || (t)==OBJ_RING) extern int o_default(); /* type list initialization */ @@ -101,7 +102,7 @@ extern int o_default(); { "texfunc", T_T|T_F, o_default }, \ { "ring", T_S, o_default }, \ { "cylinder", T_S, o_default }, \ - { "instance", T_S|T_V, o_default }, \ + { "instance", T_V, o_default }, \ { "cup", T_S, o_default }, \ { "bubble", T_S, o_default }, \ { "tube", T_S, o_default }, \ @@ -125,6 +126,7 @@ extern int o_default(); { "light", T_M|T_L, o_default }, \ { "illum", T_M|T_L, o_default }, \ { "spotlight", T_M|T_L, o_default }, \ + { "mist", T_M, o_default }, \ { "mirror", T_M|T_LV, o_default }, \ { "transfunc", T_M|T_F, o_default }, \ { "BRTDfunc", T_M|T_F, o_default }, \