rtcGraphicsHelper.h
Go to the documentation of this file.
00001 #ifndef GRAPHICSHELPER_H
00002 #define GRAPHICSHELPER_H
00003 
00004 //== INCLUDES ==================================================================
00005 #include <vector>
00006 #include <GL/glew.h>
00007 #include <GL/gl.h>
00008 #include <GL/glu.h>
00009 #include "rtc/rtcVec3.h"
00010 
00011 //== NAMESPACES ================================================================
00012 namespace rtc {
00013 
00014 //== CLASS DEFINITION ==========================================================
00015 class GraphicsHelper
00016 {
00017 public:
00018   GraphicsHelper(void);
00019   ~GraphicsHelper(void);
00020 
00021 public:
00022   void drawSphere(double x, double y, double z, double scale=1.0);
00023   void drawCoordinateFrame(double scale = 1.0);
00024   void drawGrid(double center_x=0, double center_y=0, int size=100, double resolution=1.0) const;
00025   Vec3uc getColorFromPalette(int index);
00026 
00027 protected:
00028   void initializeArrow();
00029 
00030   bool arrow_initialized;
00031   GLuint arrow_triangle_vertices_vbo;
00032   GLuint arrow_triangle_normals_vbo;
00033   GLuint arrow_quad_vertices_vbo;
00034   GLuint arrow_quad_normals_vbo;
00035 
00036   GLint initializeSphere();
00037   bool sphere_display_initialized;
00038   GLint sphere_display_list;
00039   GLuint sphere_vertices_vbo;
00040   GLuint sphere_normals_vbo;
00041   int num_sphere_vertices;
00042 
00043   static const GLbyte sphere_face_indicies[180][6];
00044   static const GLfloat sphere_vertices [92][3];
00045   static const GLfloat sphere_normals [102][3];
00046 
00047   #define COLOR_PALETTE_SIZE  13
00048   static const unsigned char graphics_colorpalette[COLOR_PALETTE_SIZE][3];
00049 };
00050 
00051 //==============================================================================
00052 } // namespace rtc
00053 //==============================================================================
00054 #endif // GRAPHICSHELPER_H
00055 //==============================================================================
00056 
00057 


rtc
Author(s): Benjamin Pitzer
autogenerated on Thu Jan 2 2014 11:04:53