--- ray/src/common/otypes.h 1991/05/07 14:53:16 1.10 +++ ray/src/common/otypes.h 1991/06/19 16:09:15 1.11 @@ -26,36 +26,37 @@ typedef struct { #define OBJ_TUBE 9 /* inverted cylinder */ #define MAT_PLASTIC 10 /* plastic surface */ #define MAT_METAL 11 /* metal surface */ -#define OBJ_SOURCE 12 /* distant source */ -#define MAT_GLASS 13 /* thin glass surface */ -#define MAT_TRANS 14 /* translucent material */ -#define MAT_DIELECTRIC 15 /* dielectric material */ -#define MAT_INTERFACE 16 /* dielectric interface */ -#define MAT_PFUNC 17 /* plastic brdf function */ -#define MAT_MFUNC 18 /* metal brdf function */ -#define PAT_BFUNC 19 /* brightness function */ -#define PAT_BDATA 20 /* brightness data */ -#define PAT_BTEXT 21 /* monochromatic text */ -#define PAT_CPICT 22 /* color picture */ -#define MAT_LIGHT 23 /* primary light source */ -#define MAT_ILLUM 24 /* secondary light source */ -#define MAT_GLOW 25 /* proximity light source */ +#define MAT_GLASS 12 /* thin glass surface */ +#define MAT_TRANS 13 /* translucent material */ +#define MAT_DIELECTRIC 14 /* dielectric material */ +#define MAT_INTERFACE 15 /* dielectric interface */ +#define MAT_PFUNC 16 /* plastic brdf function */ +#define MAT_MFUNC 17 /* metal brdf function */ +#define PAT_BFUNC 18 /* brightness function */ +#define PAT_BDATA 19 /* brightness data */ +#define PAT_BTEXT 20 /* monochromatic text */ +#define PAT_CPICT 21 /* color picture */ +#define MAT_GLOW 22 /* proximity light source */ +#define OBJ_SOURCE 23 /* distant source */ +#define MAT_LIGHT 24 /* primary light source */ +#define MAT_ILLUM 25 /* secondary light source */ #define MAT_SPOT 26 /* spot light source */ -#define MAT_TFUNC 27 /* trans brdf function */ -#define MAT_BRTDF 28 /* brtd function */ -#define MAT_PDATA 29 /* plastic brdf data */ -#define MAT_MDATA 30 /* metal brdf data */ -#define MAT_TDATA 31 /* trans brdf data */ -#define PAT_CFUNC 32 /* color function */ -#define MAT_CLIP 33 /* clipping surface */ -#define PAT_CDATA 34 /* color data */ -#define PAT_CTEXT 35 /* colored text */ -#define TEX_DATA 36 /* surface texture data */ -#define MIX_FUNC 37 /* mixing function */ -#define MIX_DATA 38 /* mixing data */ -#define MIX_TEXT 39 /* mixing text */ +#define MAT_MIRROR 27 /* mirror (secondary source) */ +#define MAT_TFUNC 28 /* trans brdf function */ +#define MAT_BRTDF 29 /* brtd function */ +#define MAT_PDATA 30 /* plastic brdf data */ +#define MAT_MDATA 31 /* metal brdf data */ +#define MAT_TDATA 32 /* trans brdf data */ +#define PAT_CFUNC 33 /* color function */ +#define MAT_CLIP 34 /* clipping surface */ +#define PAT_CDATA 35 /* color data */ +#define PAT_CTEXT 36 /* colored text */ +#define TEX_DATA 37 /* surface texture data */ +#define MIX_FUNC 38 /* mixing function */ +#define MIX_DATA 39 /* mixing data */ +#define MIX_TEXT 40 /* mixing text */ /* number of object types */ -#define NUMOTYPE 40 +#define NUMOTYPE 41 /* type flags */ #define T_S 01 /* surface (object) */ #define T_M 02 /* material */ @@ -64,10 +65,11 @@ typedef struct { #define T_X 020 /* mixture */ #define T_V 040 /* volume */ #define T_L 0100 /* light source modifier */ -#define T_F 0200 /* function */ -#define T_D 0400 /* data */ -#define T_I 01000 /* picture */ -#define T_E 02000 /* text */ +#define T_LV 0200 /* virtual light source modifier */ +#define T_F 0400 /* function */ +#define T_D 01000 /* data */ +#define T_I 02000 /* picture */ +#define T_E 04000 /* text */ /* user-defined types */ #define T_SP1 010000 #define T_SP2 020000 @@ -81,6 +83,7 @@ extern FUN ofun[]; /* our type list */ #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) @@ -99,7 +102,6 @@ extern int o_default(); { "tube", T_S, o_default }, \ { "plastic", T_M, o_default }, \ { "metal", T_M, o_default }, \ - { "source", T_S, o_default }, \ { "glass", T_M, o_default }, \ { "trans", T_M, o_default }, \ { "dielectric", T_M, o_default }, \ @@ -110,10 +112,12 @@ extern int o_default(); { "brightdata", T_P|T_D, o_default }, \ { "brighttext", T_P|T_E, o_default }, \ { "colorpict", T_P|T_I, o_default }, \ + { "glow", T_M|T_L, o_default }, \ + { "source", T_S, o_default }, \ { "light", T_M|T_L, o_default }, \ { "illum", T_M|T_L, o_default }, \ - { "glow", T_M|T_L, o_default }, \ { "spotlight", T_M|T_L, o_default }, \ + { "mirror", T_M|T_LV, o_default }, \ { "transfunc", T_M|T_F, o_default }, \ { "BRTDfunc", T_M|T_F, o_default }, \ { "plasdata", T_M|T_D, o_default }, \