DLODObject.h

00001 #ifndef DLOD_OBJECT_
00002 #define DLOD_OBJECT_
00003 
00004 #include <stdio.h>
00005 #include <windows.h>
00006 #include <GL/gl.h>
00007 #include <GL/glu.h>
00008 #include <GL/glut.h>
00009 
00010 #include "GraphicalObject.h"
00011 
00012 #define MY_INFINITY             1.0e308
00013 
00021 class DLODObject: public GraphicalObject
00022 {
00023 public:
00029         DLODObject (RawObject * best_level);
00030 
00034         ~DLODObject ();
00035 
00049         void Draw (int time, Camera * camera, Camera * monitor, bool show_bounding_volume, int culling_mode, bool level_of_detail);
00050 
00054         void PrintToConsole ();
00055 
00064         void AddLevel (RawObject * next_level, float distance);
00065 
00071         DLODObject * GetClone ();
00072 
00073 protected:
00074 
00079         void ComputeBoundingRadius ();
00080 
00085         void ComputeBoundingBox ();
00086 
00087 
00088 private:
00090         DLODObject ();
00091 
00093         static const int MAX_LEVEL = 8;
00094 
00096         int num_levels;
00097 
00099         RawObject * raw_obj[MAX_LEVEL];
00100 
00102         float distances[MAX_LEVEL+1];
00103 };
00104 
00105 #endif

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