00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RENDER_TEAPOT_H
00021 #define RENDER_TEAPOT_H
00022
00023 #include <ardev/ardev.h>
00024 #include <GL/glut.h>
00025
00026 class CLoad3DS;
00027 class t3DModel;
00030 class RenderModel : public RenderObject
00031 {
00032 public:
00034 RenderModel(const char * ModelFile, const char * TextureBase = "", double Scale = 1);
00036 ~RenderModel();
00037
00039 void Render();
00041 void ThreadInit();
00042
00043 protected:
00044 double Scale;
00045 unsigned int * g_Texture ;
00046
00047 char * TextureBase;
00048 char * ModelName;
00049 CLoad3DS * g_Load3ds;
00050 t3DModel * g_3DModel;
00051 };
00052
00053
00056 class RenderTeapot : public RenderObject
00057 {
00058 public:
00060 RenderTeapot(const ARColour & _Colour, float _size)
00061 {
00062 Size = _size;
00063 Colour = _Colour;
00064 }
00065
00066 void Render()
00067 {
00068
00069 GLfloat mat_specular[] = { Colour.r, Colour.g, Colour.b, Colour.a };
00070 GLfloat mat_diffuse[] = { Colour.r, Colour.g, Colour.b, Colour.a };
00071 GLfloat mat_shininess[] = { 50.0 };
00072
00073 glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
00074 glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
00075 glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
00076 glColor3f(Colour.r, Colour.g, Colour.b);
00077 glutSolidTeapot(Size);
00078
00079 }
00080 };
00081
00082
00083 #endif