Back to index

radiance  4R0+20100331
initotypes.c
Go to the documentation of this file.
00001 #ifndef lint
00002 static const char    RCSid[] = "$Id: initotypes.c,v 2.4 2004/03/27 12:41:45 schorsch Exp $";
00003 #endif
00004 /*
00005  * Initialize ofun[] list for octree generator
00006  */
00007 
00008 #include  "standard.h"
00009 #include  "octree.h"
00010 #include  "otypes.h"
00011 #include  "oconv.h"
00012 
00013 extern int  o_sphere(); /* XXX way too much linker magic involved here */ 
00014 extern int  o_face();
00015 extern int  o_cone();
00016 extern int  o_instance();
00017 extern int  o_mesh();
00018 
00019 FUN  ofun[NUMOTYPE] = INIT_OTYPE;
00020 
00021 void
00022 ot_initotypes(void)                /* initialize ofun array */
00023 {
00024        ofun[OBJ_SPHERE].funp =
00025        ofun[OBJ_BUBBLE].funp = o_sphere;
00026        ofun[OBJ_FACE].funp = o_face;
00027        ofun[OBJ_CONE].funp =
00028        ofun[OBJ_CUP].funp =
00029        ofun[OBJ_CYLINDER].funp =
00030        ofun[OBJ_TUBE].funp =
00031        ofun[OBJ_RING].funp = o_cone;
00032        ofun[OBJ_INSTANCE].funp = o_instance;
00033        ofun[OBJ_MESH].funp = o_mesh;
00034 }
00035 
00036 
00037 int
00038 o_default(void)                    /* default action is no intersection */
00039 {
00040        return(O_MISS);
00041 }