TorusGenerator.h

00001 #ifndef TORUS_GENERATOR_
00002 #define TORUS_GENERATOR_
00003 
00004 #include <stdio.h>
00005 
00006 #include "GroupObject.h"
00007 #include "RawObject.h"
00008 #include "TerminalObject.h"
00009 #include "DLODObject.h"
00010 
00011 
00022 class TorusGenerator
00023 {
00024 public:
00039         static GraphicalObject * CreateTorus (RawObject * raw_object, double r_t, double r_p, int rings, int slices);
00040 
00054         static GraphicalObject * CreateTorus (DLODObject * dlod_object,  double r_t, double r_p, int rings, int slices);
00055 
00062         static bool HasMore ();
00063 
00074         static void StartTorus (double r_t, double r_p, int rings, int slices);
00075 
00081         static Point GetNextPoint ();
00082 
00083 private:
00085         static int ring_index;
00087         static int slice_index;
00089         static double r_t;
00091         static double r_p;
00093         static int rings;
00095         static int slices;
00096 
00111         static GraphicalObject * CreateRings (RawObject * raw_object, double r_t, double r_p, double min_t, double max_t, int rings, int slices);
00112 
00127         static GraphicalObject * CreateRingPart (RawObject * raw_object, double r_t, double r_p, double curr_t, double min_p, double max_p, int slices);
00128 
00144         static GraphicalObject * CreateRings (DLODObject * dlod_object, double r_t, double r_p, double min_t, double max_t, int rings, int slices);
00145         
00146         /*
00147          * Creates a part of a ring of the torus using recursion. This routine is almost the same as the 'CreateRingPart (...)' 
00148          * routine above, with the only difference that a discrete level of detail object is cloned whenever the recursion
00149          * ends.
00150          *
00151          * \param dlod_object                                   The discrete level of detail object  which shall be cloned whenever
00152          *                                                                              the recursion ends.
00153          * \param r_t                                                   The t parameter of the torus creation. This is the radius at which
00154          *                                                                              the rings of the torus are created.
00155          * \param r_p                                                   The p parameter of the torus creation. This is the radius of one 
00156          *                                                                              single ring.
00157          * \param curr_t                                                The current t value for this ring.
00158          * \param min_p                                                 The minimal p value of the part of the ring which shall be created.
00159          * \param max_p                                                 The maximal p value of the part of the ring which shall be created.
00160          * \param slices                                                The number of points to be created during this routine.
00161          */
00162         static GraphicalObject * CreateRingPart (DLODObject * dlod_object, double r_t, double r_p, double curr_t, double min_p, double max_p, int slices);
00163 };
00164 
00165 #endif

Generated on Sun Jul 2 13:20:39 2006 for Demo by  doxygen 1.4.6-NO