OpenGL_drawer.h

Go to the documentation of this file.
00001 /*
00002 ** OpenGL_drawer.h
00003 ** 
00004 ** Made by damien
00005 ** Login   <damien@ortie>
00006 ** 
00007 ** Started on  Sat Jan 26 10:34:05 2008 damien
00008 ** Last update Sat Jan 26 10:34:05 2008 damien
00009 */
00010 
00011 #ifndef         OPENGL_DRAWER_H_
00012 # define        OPENGL_DRAWER_H_
00013 
00014 
00015 #include <stdlib.h>
00016 #include <iostream>
00017 #include <cmath>
00018 #include <string>
00019 #include <errno.h>
00020 #include <stdio.h>
00021 #include <GL/glut.h>
00022 #include <GL/glext.h>
00023 using namespace std;
00024 
00025 #include <Navigator_tool.h>
00026 #include <Mesh_object.h>
00027 #include <Segment.h>
00028 #include <Triangle.h>
00029 #include <Polygon.h>
00030 #include <Curve_3D.h>
00031 
00032 #include <Skeleton.h>
00033 #include <Texture.h>
00034 
00035 class OpenGL_drawer
00036 {
00037 
00038  public:
00039 
00040   OpenGL_drawer();
00041   ~OpenGL_drawer();
00042 
00043 
00044   int draw_mesh_slow(Mesh_object& mesh);
00045   int draw_mesh_grid(Mesh_object& mesh);
00046   int init_opengl(int arc,char **argv,const Navigator_tool& navigator);
00047   int draw_local_basis(Navigator_tool& navigator);
00048 
00049   int draw_segment(const Segment& s) const;
00050   int draw_triangle(const Triangle& t) const;
00051   int draw_polygon(const Polygon& p) const;
00052   int draw_curve(const Curve_3D& c) const;
00053 
00054   int draw_skeleton(Skeleton &);
00055   GLuint load_texture(const char* filename);
00056   
00057 
00058  private:
00059   
00060   std::vector <GLint> draw_list;
00061   
00062   std::vector <GLfloat> current_color;
00063   int set_current_color(int k_bone);
00064   
00065 };
00066 
00067 #endif      /* !OPENGL_DRAWER_H_ */

Generated on Mon Mar 30 16:55:54 2009 by  doxygen 1.5.6