Hierarchical Edge Bundle 1.0
J:/Caro/C++_Coding/HierarchicalEdgeBundle/HierarchicalEdgeBundle/header/RenderImplementation.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "Renderer.h"
00003 #include "Shader.h"
00004 #include "FBO.h"
00005 #include "Camera.h"
00006 #include "Light.h"
00007 #include "View.h"
00008 #include "Image.h"
00009 
00010 #include <glew.h>
00011 #include <QGLWidget>
00012 #include <QtOpenGL>
00013 #include <QColor>
00014 #include <QGLContext>
00015 #include <QGLFormat>
00016 
00022 class RenderImplementation :    public Renderer
00023 {
00024 public:
00028         RenderImplementation(void);
00032         ~RenderImplementation(void);
00033 
00037         void Initialize();
00042         void CreateObjects(View** view);
00048         void DrawObjects(Camera* camera, Light* light);
00049 
00053         void DrawGrid();
00057         void DrawVertices();
00061         void DrawAllVertices();
00066         void DrawSelectedVertex(VertexPtr v);
00071         void DrawNotSelectedVertices(VertexPtr v);
00075         void DrawRelationEdges();
00079         void DrawHierarchyEdges();
00084         void DrawHierarchyEdges(bool noshadow);
00095         void DrawScreenAlignedQuad(int tex, int tex2, int tex3, int tex4, int tex5,int tex6,int tex7);
00096 
00100         void BeginCamera();
00105         void BeginCamera(Camera* cam);
00109         void EndCamera();
00120         void BeginTextures(int tex, int tex2, int tex3, int tex4, int tex5,int tex6,int tex7);
00124         void EndTextures();     
00125 
00126         Camera* camera;
00127 
00128 public:
00129         //FONT
00133         void LoadFont();
00137         void UnloadFont();
00146         void DrawFont(GLint x, GLint y, std::string string, int set,float scale);       // Where The Printing Happens
00151         void DrawHUD(int time);
00156         Matrix GetModelViewMatrix();
00161         Matrix GetProjectionMatrix();
00162 
00163 public:
00169         void Picking(int curserX, int curserY);
00170 
00176         virtual void UpdateSphereColor(vec3 color, float alpha);
00182         virtual void UpdateHierarchyEdgeColor(vec3 color, float alpha);
00190         void UpdateHierarchyEdgeColorAt(vec3 color, float alpha, unsigned int actView);
00199         void UpdateHierarchyEdgeColorSelectionAt(vec3 color, float alpha, vec3 sele_color, float sele_alpha, unsigned int at);
00208         void UpdateRelationEdgeColor(vec3 color, float alpha, vec3 sele_color, float sele_alpha, unsigned int at);
00216         virtual void UpdateRelationEdgeColor(vec3 color, float alpha, vec3 endcolor, float endalpha);
00222         virtual void UpdateSelectionColor(vec3 color, float alpha);
00223 private:
00228         void DrawVerticesPass(Matrix lightmatrix);
00232         void DrawRelationEdgePass();
00236         void DrawRelationEdgePassMethod1();
00240         void DrawRelationEdgePassMethod2();
00244         void DrawRelationEdgePassMethod3();
00249         void DrawShadowPass(Matrix& m);
00254         void DrawShadow(Matrix lightmatrix);
00258         void DrawResult();
00262         void UpdateLight();
00266         void UpdateSelection();
00267 
00268         int rendermode;
00269         
00270         Camera* cam_shadow;     
00271 
00272         //Shader
00273         ShaderObj* shaderobj_shadow;
00274         Shader* shadowshader;
00275 
00276         Shader* lightingshader;
00277         ShaderObj* shaderobj_lighting;
00278 
00279         ShaderObj* shaderobj;
00280         Shader* lightningshader;
00281 
00282         Shader* initweightingshader;    
00283         ShaderObj* shaderobj_weighting;
00284 
00285         ShaderObj* shaderobj_finalweighting;
00286         Shader* finalweightingshader;
00287 
00288         ShaderObj* shaderobj_blending;
00289         Shader* initblendingshader;
00290 
00291         Shader* initsumshader;
00292         ShaderObj* shaderobj_sum;
00293         Shader* finalsumshader;
00294         ShaderObj* shaderobj_finalsum;
00295 
00296         //FBO
00297         FBO* fbo_opacity;
00298         FBO* fbo_transparency;
00299         FBO* fbo_transparency2;
00300         FBO* fbo_shadow;
00301 
00302         GLuint tex_font;
00303         GLuint dl_font;
00304 
00305 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines