ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/initotypes.c
Revision: 1.2
Committed: Wed May 1 11:16:52 1991 UTC (33 years ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.1: +7 -0 lines
Log Message:
added -i option for irradiance calculation

File Contents

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