ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/initotypes.c
Revision: 2.1
Committed: Tue Nov 12 17:08:31 1991 UTC (32 years, 5 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.6: +0 -0 lines
Log Message:
updated revision number for release 2.0

File Contents

# Content
1 /* Copyright (c) 1990 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_dielectric();
24 extern int m_glass();
25 extern int m_clip();
26 extern int m_mirror();
27 extern int m_direct();
28 extern int m_brdf();
29 extern int t_func(), t_data();
30 extern int p_cfunc(), p_bfunc();
31 extern int p_pdata(), p_cdata(), p_bdata();
32 extern int mx_func(), mx_data();
33 extern int text();
34
35 FUN ofun[NUMOTYPE] = INIT_OTYPE;
36
37
38 initotypes() /* initialize ofun array */
39 {
40 ofun[OBJ_SPHERE].funp =
41 ofun[OBJ_BUBBLE].funp = o_sphere;
42 ofun[OBJ_FACE].funp = o_face;
43 ofun[OBJ_CONE].funp =
44 ofun[OBJ_CUP].funp =
45 ofun[OBJ_CYLINDER].funp =
46 ofun[OBJ_TUBE].funp =
47 ofun[OBJ_RING].funp = o_cone;
48 ofun[OBJ_INSTANCE].funp = o_instance;
49 ofun[MAT_LIGHT].funp =
50 ofun[MAT_ILLUM].funp =
51 ofun[MAT_GLOW].funp =
52 ofun[MAT_SPOT].funp = m_light;
53 ofun[MAT_PLASTIC].funp =
54 ofun[MAT_METAL].funp =
55 ofun[MAT_TRANS].funp = m_normal;
56 ofun[MAT_TRANS].flags |= T_IRR_IGN;
57 ofun[MAT_DIELECTRIC].funp =
58 ofun[MAT_INTERFACE].funp = m_dielectric;
59 ofun[MAT_DIELECTRIC].flags |= T_IRR_IGN;
60 ofun[MAT_INTERFACE].flags |= T_IRR_IGN;
61 ofun[MAT_GLASS].funp = m_glass;
62 ofun[MAT_GLASS].flags |= T_IRR_IGN;
63 ofun[MAT_MIRROR].funp = m_mirror;
64 ofun[MAT_DIRECT1].funp =
65 ofun[MAT_DIRECT2].funp = m_direct;
66 ofun[MAT_CLIP].funp = m_clip;
67 ofun[MAT_PFUNC].funp =
68 ofun[MAT_MFUNC].funp =
69 ofun[MAT_PDATA].funp =
70 ofun[MAT_MDATA].funp =
71 ofun[MAT_TFUNC].funp =
72 ofun[MAT_BRTDF].funp =
73 ofun[MAT_TDATA].funp = m_brdf;
74 ofun[TEX_FUNC].funp = t_func;
75 ofun[TEX_DATA].funp = t_data;
76 ofun[PAT_CFUNC].funp = p_cfunc;
77 ofun[PAT_BFUNC].funp = p_bfunc;
78 ofun[PAT_CPICT].funp = p_pdata;
79 ofun[PAT_CDATA].funp = p_cdata;
80 ofun[PAT_BDATA].funp = p_bdata;
81 ofun[PAT_CTEXT].funp =
82 ofun[PAT_BTEXT].funp =
83 ofun[MIX_TEXT].funp = text;
84 ofun[MIX_FUNC].funp = mx_func;
85 ofun[MIX_DATA].funp = mx_data;
86 }
87
88
89 o_default() /* default action is error */
90 {
91 error(INTERNAL, "unexpected object call");
92 }