ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/ot/initotypes.c
Revision: 2.4
Committed: Sat Mar 27 12:41:45 2004 UTC (20 years ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD
Changes since 2.3: +7 -7 lines
Log Message:
Continued ANSIfication. Renamed local initotypes() to ot_initotypes().

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id: initotypes.c,v 2.3 2003/03/11 17:08:55 greg Exp $";
3 #endif
4 /*
5 * Initialize ofun[] list for octree generator
6 */
7
8 #include "standard.h"
9 #include "octree.h"
10 #include "otypes.h"
11 #include "oconv.h"
12
13 extern int o_sphere(); /* XXX way too much linker magic involved here */
14 extern int o_face();
15 extern int o_cone();
16 extern int o_instance();
17 extern int o_mesh();
18
19 FUN ofun[NUMOTYPE] = INIT_OTYPE;
20
21 void
22 ot_initotypes(void) /* initialize ofun array */
23 {
24 ofun[OBJ_SPHERE].funp =
25 ofun[OBJ_BUBBLE].funp = o_sphere;
26 ofun[OBJ_FACE].funp = o_face;
27 ofun[OBJ_CONE].funp =
28 ofun[OBJ_CUP].funp =
29 ofun[OBJ_CYLINDER].funp =
30 ofun[OBJ_TUBE].funp =
31 ofun[OBJ_RING].funp = o_cone;
32 ofun[OBJ_INSTANCE].funp = o_instance;
33 ofun[OBJ_MESH].funp = o_mesh;
34 }
35
36
37 int
38 o_default(void) /* default action is no intersection */
39 {
40 return(O_MISS);
41 }