ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/otypes.h
Revision: 1.6
Committed: Thu Dec 13 08:58:30 1990 UTC (33 years, 4 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.5: +10 -1 lines
Log Message:
added plasfunc, metfunc, plasdata and metdata

File Contents

# Content
1 /* Copyright (c) 1986 Regents of the University of California */
2
3 /* SCCSid "$SunId$ LBL" */
4
5 /*
6 * otypes.h - defines for object types.
7 *
8 * 1/28/86
9 */
10
11 typedef struct {
12 char *funame; /* function name */
13 int (*funp)(); /* pointer to function */
14 } FUN;
15 /* surface types */
16 #define OBJ_MIN 0
17 #define OBJ_SOURCE (OBJ_MIN+0) /* distant source */
18 #define OBJ_SPHERE (OBJ_MIN+1) /* sphere */
19 #define OBJ_BUBBLE (OBJ_MIN+2) /* inverted sphere */
20 #define OBJ_FACE (OBJ_MIN+3) /* polygon */
21 #define OBJ_CONE (OBJ_MIN+4) /* cone */
22 #define OBJ_CUP (OBJ_MIN+5) /* inverted cone */
23 #define OBJ_CYLINDER (OBJ_MIN+6) /* cylinder */
24 #define OBJ_TUBE (OBJ_MIN+7) /* inverted cylinder */
25 #define OBJ_RING (OBJ_MIN+8) /* disk */
26 #define OBJ_INSTANCE (OBJ_MIN+9) /* octree instance */
27 #define OBJ_CNT 10
28 /* material types */
29 #define MOD_MIN MAT_MIN
30 #define MAT_MIN (OBJ_MIN+OBJ_CNT)
31 #define MAT_LIGHT (MAT_MIN+0) /* primary light source */
32 #define MAT_ILLUM (MAT_MIN+1) /* secondary light source */
33 #define MAT_GLOW (MAT_MIN+2) /* proximity light source */
34 #define MAT_SPOT (MAT_MIN+3) /* spot light source */
35 #define MAT_PLASTIC (MAT_MIN+4) /* plastic surface */
36 #define MAT_METAL (MAT_MIN+5) /* metal surface */
37 #define MAT_TRANS (MAT_MIN+6) /* translucent material */
38 #define MAT_DIELECTRIC (MAT_MIN+7) /* dielectric material */
39 #define MAT_INTERFACE (MAT_MIN+8) /* dielectric interface */
40 #define MAT_GLASS (MAT_MIN+9) /* thin glass surface */
41 #define MAT_CLIP (MAT_MIN+10) /* clipping surface */
42 #define MAT_PFUNC (MAT_MIN+11) /* plastic brdf function */
43 #define MAT_MFUNC (MAT_MIN+12) /* metal brdf function */
44 #define MAT_PDATA (MAT_MIN+13) /* plastic brdf data */
45 #define MAT_MDATA (MAT_MIN+14) /* metal brdf data */
46 #define MAT_CNT 15
47 /* textures and patterns */
48 #define TP_MIN (MAT_MIN+MAT_CNT)
49 #define TEX_FUNC (TP_MIN+0) /* surface texture function */
50 #define TEX_DATA (TP_MIN+1) /* surface texture data */
51 #define PAT_CFUNC (TP_MIN+2) /* color function */
52 #define PAT_BFUNC (TP_MIN+3) /* brightness function */
53 #define PAT_CPICT (TP_MIN+4) /* color picture */
54 #define PAT_CDATA (TP_MIN+5) /* color data */
55 #define PAT_BDATA (TP_MIN+6) /* brightness data */
56 #define PAT_CTEXT (TP_MIN+7) /* colored text */
57 #define PAT_BTEXT (TP_MIN+8) /* monochromatic text */
58 #define MIX_FUNC (TP_MIN+9) /* mixing function */
59 #define MIX_DATA (TP_MIN+10) /* mixing data */
60 #define MIX_TEXT (TP_MIN+11) /* mixing text */
61 #define TP_CNT 12
62 #define MOD_CNT (MAT_CNT+TP_CNT)
63 /* number of object types */
64 #define NUMOTYPE (OBJ_CNT+MAT_CNT+TP_CNT)
65
66 #define issurface(t) ((t) >= OBJ_MIN && (t) < OBJ_MIN+OBJ_CNT)
67 #define isvolume(t) ((t) == OBJ_INSTANCE)
68 #define ismodifier(t) ((t) >= MOD_MIN && (t) < MOD_MIN+MOD_CNT)
69 #define ismaterial(t) ((t) >= MAT_MIN && (t) < MAT_MIN+MAT_CNT)
70 #define istexture(t) ((t) >= TP_MIN && (t) < TP_MIN+TP_CNT)
71
72 extern int o_source();
73 extern int o_sphere();
74 extern int o_face();
75 extern int o_cone();
76 extern int o_instance();
77 extern int m_light();
78 extern int m_normal();
79 extern int m_dielectric();
80 extern int m_glass();
81 extern int m_clip();
82 extern int m_brdf();
83 extern int t_func(), t_data();
84 extern int p_cfunc(), p_bfunc();
85 extern int p_pdata(), p_cdata(), p_bdata();
86 extern int mx_func(), mx_data();
87 extern int text();
88
89 #define INIT_OTYPE { { "source", o_source }, \
90 { "sphere", o_sphere }, \
91 { "bubble", o_sphere }, \
92 { "polygon", o_face }, \
93 { "cone", o_cone }, \
94 { "cup", o_cone }, \
95 { "cylinder", o_cone }, \
96 { "tube", o_cone }, \
97 { "ring", o_cone }, \
98 { "instance", o_instance }, \
99 { "light", m_light }, \
100 { "illum", m_light }, \
101 { "glow", m_light }, \
102 { "spotlight", m_light }, \
103 { "plastic", m_normal }, \
104 { "metal", m_normal }, \
105 { "trans", m_normal }, \
106 { "dielectric", m_dielectric }, \
107 { "interface", m_dielectric }, \
108 { "glass", m_glass }, \
109 { "antimatter", m_clip }, \
110 { "plasfunc", m_brdf }, \
111 { "metfunc", m_brdf }, \
112 { "plasdata", m_brdf }, \
113 { "metdata", m_brdf }, \
114 { "texfunc", t_func }, \
115 { "texdata", t_data }, \
116 { "colorfunc", p_cfunc }, \
117 { "brightfunc", p_bfunc }, \
118 { "colorpict", p_pdata }, \
119 { "colordata", p_cdata }, \
120 { "brightdata", p_bdata }, \
121 { "colortext", text }, \
122 { "brighttext", text }, \
123 { "mixfunc", mx_func }, \
124 { "mixdata", mx_data }, \
125 { "mixtext", text } }
126
127 #define ALIASID "alias" /* alias type identifier */
128
129 extern FUN ofun[];