ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/initotypes.c
Revision: 2.6
Committed: Wed Jan 20 14:10:06 1999 UTC (25 years, 3 months ago) by gwlarson
Content type: text/plain
Branch: MAIN
Changes since 2.5: +2 -1 lines
Log Message:
added "mixpict" primitive

File Contents

# Content
1 /* Copyright (c) 1992 Regents of the University of California */
2
3 #ifndef lint
4 static char SCCSid[] = "$SunId$ LBL";
5 #endif
6
7 /*
8 * Initialize ofun[] list for renderers
9 */
10
11 #include "standard.h"
12
13 #include "otypes.h"
14
15 #include "otspecial.h"
16
17 extern int o_sphere();
18 extern int o_face();
19 extern int o_cone();
20 extern int o_instance();
21 extern int m_light();
22 extern int m_normal();
23 extern int m_aniso();
24 extern int m_dielectric();
25 extern int m_mist();
26 extern int m_glass();
27 extern int m_clip();
28 extern int m_mirror();
29 extern int m_direct();
30 extern int m_brdf();
31 extern int m_brdf2();
32 extern int t_func(), t_data();
33 extern int p_cfunc(), p_bfunc();
34 extern int p_pdata(), p_cdata(), p_bdata();
35 extern int mx_func(), mx_data(), mx_pdata();
36 extern int do_text();
37
38 FUN ofun[NUMOTYPE] = INIT_OTYPE;
39
40
41 initotypes() /* initialize ofun array */
42 {
43 ofun[OBJ_SPHERE].funp =
44 ofun[OBJ_BUBBLE].funp = o_sphere;
45 ofun[OBJ_FACE].funp = o_face;
46 ofun[OBJ_CONE].funp =
47 ofun[OBJ_CUP].funp =
48 ofun[OBJ_CYLINDER].funp =
49 ofun[OBJ_TUBE].funp =
50 ofun[OBJ_RING].funp = o_cone;
51 ofun[OBJ_INSTANCE].funp = o_instance;
52 ofun[MAT_LIGHT].funp =
53 ofun[MAT_ILLUM].funp =
54 ofun[MAT_GLOW].funp =
55 ofun[MAT_SPOT].funp = m_light;
56 ofun[MAT_PLASTIC].funp =
57 ofun[MAT_METAL].funp =
58 ofun[MAT_TRANS].funp = m_normal;
59 ofun[MAT_TRANS].flags |= T_IRR_IGN;
60 ofun[MAT_PLASTIC2].funp =
61 ofun[MAT_METAL2].funp =
62 ofun[MAT_TRANS2].funp = m_aniso;
63 ofun[MAT_TRANS2].flags |= T_IRR_IGN;
64 ofun[MAT_DIELECTRIC].funp =
65 ofun[MAT_INTERFACE].funp = m_dielectric;
66 ofun[MAT_DIELECTRIC].flags |= T_IRR_IGN;
67 ofun[MAT_INTERFACE].flags |= T_IRR_IGN;
68 ofun[MAT_MIST].funp = m_mist;
69 ofun[MAT_MIST].flags |= T_IRR_IGN;
70 ofun[MAT_GLASS].funp = m_glass;
71 ofun[MAT_GLASS].flags |= T_IRR_IGN;
72 ofun[MAT_MIRROR].funp = m_mirror;
73 ofun[MAT_DIRECT1].funp =
74 ofun[MAT_DIRECT2].funp = m_direct;
75 ofun[MAT_CLIP].funp = m_clip;
76 ofun[MAT_BRTDF].funp = m_brdf;
77 ofun[MAT_PFUNC].funp =
78 ofun[MAT_MFUNC].funp =
79 ofun[MAT_PDATA].funp =
80 ofun[MAT_MDATA].funp =
81 ofun[MAT_TFUNC].funp =
82 ofun[MAT_TDATA].funp = m_brdf2;
83 ofun[TEX_FUNC].funp = t_func;
84 ofun[TEX_DATA].funp = t_data;
85 ofun[PAT_CFUNC].funp = p_cfunc;
86 ofun[PAT_BFUNC].funp = p_bfunc;
87 ofun[PAT_CPICT].funp = p_pdata;
88 ofun[PAT_CDATA].funp = p_cdata;
89 ofun[PAT_BDATA].funp = p_bdata;
90 ofun[PAT_CTEXT].funp =
91 ofun[PAT_BTEXT].funp =
92 ofun[MIX_TEXT].funp = do_text;
93 ofun[MIX_FUNC].funp = mx_func;
94 ofun[MIX_DATA].funp = mx_data;
95 ofun[MIX_PICT].funp = mx_pdata;
96 }
97
98
99 o_default() /* default action is error */
100 {
101 error(INTERNAL, "unexpected object call");
102 }