versor  3.0
C++11 library for Geometric algebra
vsr_graph_draw.h
1 /*
2  * =====================================================================================
3  *
4  * Filename: vsr_graph_draw.h
5  *
6  * Description: draw half-edge graph
7  *
8  * Version: 1.0
9  * Created: 05/01/2014 16:27:34
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Pablo Colapinto (), gmail -> wolftype
14  * Organization:
15  *
16  * =====================================================================================
17  */
18 
19 #include "gfx/gfx_render.h"
20 
21 #include "form/vsr_graph.h"
22 #include "vsr_generic_draw.h"
23 
24 namespace gfx{
25 
26 //Draw HEGraph Structure
27 //template<class T>
28 //void Immediate( const HEGraph<T>& graph){
29 //
30 // for (int i = 0; i < graph.edge().size(); ++i){
31 //
32 // if ( graph.edge()[i] -> opp == NULL ) glColor3f(1,0,0);
33 // else glColor3f(0,1,0);
34 //
35 // glBegin(GL_LINES);
36 // GL::vertex( graph.edge()[i] -> next -> next -> node -> ptr -> begin() );
37 // glColor3f(0,0,1);
38 // GL::vertex( graph.edge()[i] -> node -> ptr -> begin() );
39 // glEnd();
40 //
41 // }
42 //
43 // for (auto& i : graph.face() ){
44 // ColorTriangles(i->a(), i->b(), i->c() );
45 // }
46 //}
47 
48 // template<class T>
49 // struct Renderable<vsr::HEGraph<T>> : RenderableBase< vsr::HEGraph<T> > {
50 //
51 // static void DrawImmediate( const vsr::HEGraph<T>& graph){
52 // glBegin(GL_TRIANGLES);
53 // for (auto& i : graph.face()){
54 // auto& a = i->a();
55 // auto& b = i->b();
56 // auto& c = i->c();
57 // //glColor4f(.2,1,.2,.7);
58 // GL::normal( a.normal.begin() );
59 // GL::vertex( a.pos.begin() );
60 // GL::normal( b.normal.begin() );
61 // GL::vertex( b.pos.begin() );
62 // GL::normal( c.normal.begin() );
63 // GL::vertex( c.pos.begin() );
64 // }
65 // glEnd();
66 // }
67 //
68 // static void Draw( const vsr::HEGraph<T>& f, GFXSceneNode*){}
69 // };
70 
71 } //gfx::
Definition: vsr_cga2D_draw.h:13