00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GLQUAD_H
00019 #define GLQUAD_H
00020
00021 #include "glplane.h"
00022 #include "glsurface.h"
00023 #include "glrendermode.h"
00024
00028 namespace GLScene
00029 {
00030
00031 class GLQuad: public GLPlane, public GLSurfaceGenerator
00032 {
00033 GLVector corner[4];
00034 GLSurface surf;
00035 public:
00036 GLQuad();
00037 GLQuad(GLVector c0, GLVector c1, GLVector c2, GLVector c3);
00038 ~GLQuad();
00039
00040 void set(GLVector c0, GLVector c1, GLVector c2, GLVector c3);
00041
00043 virtual void getVertecies(const GLfloat u, const GLuint nOfV, GLfloat* const verts3) const;
00045 virtual void getNormals(const GLfloat u, const GLuint nOfN, GLfloat* const normals3) const;
00046
00047 void setLOD(unsigned l) { surf.setLOD(l); }
00048
00049 virtual void render( );
00050 void renderForSelection(GLuint& previousName);
00051 };
00052 };
00053
00054 #endif