--- ray/src/common/otypes.h 1991/11/12 16:54:43 2.1 +++ ray/src/common/otypes.h 2003/02/22 02:07:22 2.8 @@ -1,11 +1,63 @@ -/* Copyright (c) 1986 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid: $Id: otypes.h,v 2.8 2003/02/22 02:07:22 greg Exp $ */ /* * otypes.h - defines for object types. + */ + +/* ==================================================================== + * The Radiance Software License, Version 1.0 * - * 1/28/86 + * Copyright (c) 1990 - 2002 The Regents of the University of California, + * through Lawrence Berkeley National Laboratory. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes Radiance software + * (http://radsite.lbl.gov/) + * developed by the Lawrence Berkeley National Laboratory + * (http://www.lbl.gov/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Radiance," "Lawrence Berkeley National Laboratory" + * and "The Regents of the University of California" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact radiance@radsite.lbl.gov. + * + * 5. Products derived from this software may not be called "Radiance", + * nor may "Radiance" appear in their name, without prior written + * permission of Lawrence Berkeley National Laboratory. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of Lawrence Berkeley National Laboratory. For more + * information on Lawrence Berkeley National Laboratory, please see + * . */ typedef struct { @@ -29,36 +81,41 @@ typedef struct { #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_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 */ -#define MAT_DIRECT1 41 /* unidirecting material */ -#define MAT_DIRECT2 42 /* bidirecting material */ +#define MAT_PLASTIC2 15 /* anisotropic plastic */ +#define MAT_METAL2 16 /* anisotropic metal */ +#define MAT_TRANS2 17 /* anisotropic translucent material */ +#define MAT_INTERFACE 18 /* dielectric interface */ +#define MAT_PFUNC 19 /* plastic brdf function */ +#define MAT_MFUNC 20 /* metal brdf function */ +#define PAT_BFUNC 21 /* brightness function */ +#define PAT_BDATA 22 /* brightness data */ +#define PAT_BTEXT 23 /* monochromatic text */ +#define PAT_CPICT 24 /* color picture */ +#define MAT_GLOW 25 /* proximity light source */ +#define OBJ_SOURCE 26 /* distant source */ +#define MAT_LIGHT 27 /* primary light source */ +#define MAT_ILLUM 28 /* secondary light source */ +#define MAT_SPOT 29 /* spot light source */ +#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 MIX_PICT 45 /* mixing picture */ +#define MAT_DIRECT1 46 /* unidirecting material */ +#define MAT_DIRECT2 47 /* bidirecting material */ /* number of object types */ -#define NUMOTYPE 43 +#define NUMOTYPE 48 /* type flags */ #define T_S 01 /* surface (object) */ #define T_M 02 /* material */ @@ -81,14 +138,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 */ @@ -98,7 +155,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 }, \ @@ -107,6 +164,9 @@ extern int o_default(); { "glass", T_M, o_default }, \ { "trans", T_M, o_default }, \ { "dielectric", T_M, o_default }, \ + { "plastic2", T_M|T_F, o_default }, \ + { "metal2", T_M|T_F, o_default }, \ + { "trans2", T_M|T_F, o_default }, \ { "interface", T_M, o_default }, \ { "plasfunc", T_M|T_F, o_default }, \ { "metfunc", T_M|T_F, o_default }, \ @@ -119,6 +179,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 }, \ @@ -133,6 +194,7 @@ extern int o_default(); { "mixfunc", T_X|T_F, o_default }, \ { "mixdata", T_X|T_D, o_default }, \ { "mixtext", T_X|T_E, o_default }, \ + { "mixpict", T_X|T_I, o_default }, \ { "prism1", T_M|T_F|T_LV, o_default }, \ { "prism2", T_M|T_F|T_LV, o_default }, \ }