00001 00008 #ifndef _SHAPEMODEL_H 00009 #define _SHAPEMODEL_H 00010 00011 #include "utils.h" 00012 #include "model.h" 00013 #include "shape.h" 00014 00015 #include <gfx/gl.h> 00016 00020 class ShapeModel : public Model { 00021 public: 00022 ShapeModel( Shape shape, Vec3 size ); 00023 00024 ShapeModel( Shape shape, Vec3 size, const Material& mat ); 00025 00026 virtual ~ShapeModel(); 00027 00028 virtual void render( void ); 00029 00030 virtual Vec3 get_min( void ) { return _min; } 00031 virtual Vec3 get_max( void ) { return _max; } 00032 private: 00033 void _gen_object(); 00034 00035 GLUquadric *_quadric; 00036 Shape _shape; 00037 Vec3 _size; 00038 Vec3 _min, _max; 00039 }; 00040 00041 #endif // header guard