Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

drawable.h

Go to the documentation of this file.
00001 #ifndef DRAWABLE_H
00002 #define DRAWABLE_H
00003 
00004 #include <iostream>
00005 #include <stdio.h>
00006 #include <stdlib.h>
00007 #include <string.h>
00008 #include "sphere.h"
00009 #include "cylinder.h"
00010 #include "array.cpp"
00011 
00012 #ifdef GRAPHICS
00013 #include <FL/Fl.h>
00014 #include <FL/Fl_Window.h>
00015 #include <FL/Fl_Double_Window.h>
00016 #include <FL/Fl_Gl_Window.h>
00017 #include <FL/Fl_Input.h>
00018 #include <FL/Fl_Box.h>
00019 #include <FL/Fl_Choice.h>
00020 #include <FL/fl_ask.h>
00021 #include <FL/fl_draw.h>
00022 #include <FL/fl_file_chooser.h>
00023 #include <FL/Fl_Color_Chooser.H>
00024 #include <FL/Fl_Menu_Bar.h>
00025 #include <FL/Fl_Button.h>
00026 #include <FL/Fl_Menu_Button.h>
00027 #include <FL/Fl_Counter.h>
00028 #endif
00029 
00045 class drawable
00046 {
00047     public:
00048         double distance;    
00049         int type;           
00050         void *object;       
00051 
00062         template <class T, class S>
00063         static void add ( ap_array<drawable> *objects,
00064                 ap_array<sphere<T,S> > *spheres, int is_short=0 );
00065 
00073         template <class T, class S>
00074         static void add ( ap_array<drawable> *objects,
00075                 ap_array<gl_cylinder<T,S> > *cylinders, int is_short=0 );
00076 
00093         static void sort ( ap_array<drawable> *objects );
00094 
00098         template <class T, class S>
00099         drawable ( sphere<T,S> *s ) {
00100             type = AP_SPHERE;
00101             object = s;
00102         };
00103 
00107         template <class T, class S>
00108         drawable ( gl_cylinder<T,S> *c ) {
00109             type = AP_CYLINDER;
00110             object = c;
00111         };
00112 
00116         drawable () {
00117         };
00118 };
00119 
00120 #endif

Generated on Thu Nov 27 08:17:11 2003 for Animp - Animated Particles by doxygen 1.3.2