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