tp_master.cpp 14.4 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps  *
* version 0.1                                                                  *
* Copyright (C) 2009, IGG Team, LSIIT, University of Strasbourg                *
*                                                                              *
* This library is free software; you can redistribute it and/or modify it      *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your     *
* option) any later version.                                                   *
*                                                                              *
* This library is distributed in the hope that it will be useful, but WITHOUT  *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or        *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License  *
* for more details.                                                            *
*                                                                              *
* You should have received a copy of the GNU Lesser General Public License     *
* along with this library; if not, write to the Free Software Foundation,      *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.           *
*                                                                              *
* Web site: https://iggservis.u-strasbg.fr/CGoGN/                              *
* Contact information: cgogn@unistra.fr                                        *
*                                                                              *
*******************************************************************************/

#include <iostream>
#include <time.h>
#include <algorithm>

29
#include "tp_master.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
30

31
#include "Topology/generic/parameters.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
32
33
34
35
36
37
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"

#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"

38
39
#include "Algo/Render/GL2/mapRender.h"
#include "Algo/Render/GL2/topoRender.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
40
41
42
43
44
45
46
#include "Algo/Geometry/normal.h"

#include "Algo/Selection/raySelector.h"

#include "Algo/Import/import.h"
#include "Algo/Geometry/boundingbox.h"

47
48
49
#include "Utils/shaderSimpleColor.h"
#include "Utils/shaderPhong.h"

50
51
#include "Utils/drawer.h"

Pierre Kraemer's avatar
Pierre Kraemer committed
52

Pierre Kraemer's avatar
Pierre Kraemer committed
53
54
55
56
57
58
/// pour simplifier l'ecriture du code
using namespace CGoGN;


/// definition de la structure qui decrit le type de carte utilise

59
struct PFP: public PFP_STANDARD
Pierre Kraemer's avatar
Pierre Kraemer committed
60
{
Pierre Kraemer's avatar
Pierre Kraemer committed
61
	// definition of the map
Pierre Kraemer's avatar
Pierre Kraemer committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
	typedef EmbeddedMap2<Map2> MAP;
};


/// definition de la carte en  global, plus facile 
PFP::MAP myMap;

// handler d'attribut de position par sommet
AttributeHandler<PFP::VEC3> position;

// handler d'attribut de normale par sommet
AttributeHandler<PFP::VEC3> normal;

/// fonction qui renvoit vrai (appliquée à un brin)
76
//SelectorTrue allDarts;
Pierre Kraemer's avatar
Pierre Kraemer committed
77

Pierre Kraemer's avatar
Pierre Kraemer committed
78
/// encore 1 typedef pour simplifier l'ecriture du code
Pierre Kraemer's avatar
Pierre Kraemer committed
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
typedef PFP::VEC3 Point3D;

/// pile des brins selectionnes (6 max)
std::vector<Dart> selected_darts;

/// 3 brins de la carte encore en global pour pouvoir utiliser le callback clavier de glut !
Dart d_carre;
Dart d_tri;
Dart d_maison;

///Fonctions a connaitre:
///
/// phi1(d), phi2(d) : evident ?
/// phi<21>(d) equivalent a phi2(phi1(d)), phi<121212> equivalent a ....
///
///  Creer un face: newOrientedFace(nb_cotes); renvoit un Dart
///






///  Fonction Carre: construit un carre et renvoit un brin
///

Dart Carre()
{
sylvain thery's avatar
sylvain thery committed
107
	return Dart::nil();
Pierre Kraemer's avatar
Pierre Kraemer committed
108
109
110
111
112
113
114
}


///  Fonction Triangle: construit un triangle et renvoit un brin

Dart Triangle()
{
sylvain thery's avatar
sylvain thery committed
115
	return Dart::nil();
Pierre Kraemer's avatar
Pierre Kraemer committed
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
}


///  Fonction Colle: effectue la couture du carre et du triangle, le carre ne bouge pas
/// Attention aux plongements des sommets topologiquement modifies
/// Fonction a utiliser: sewFaces(d,e): colle deux faces par d et e

/// appel clavier touche 'c'

void Colle(Dart d, Dart e)
{
}


///  Fonction Colle: effectue la couture du carre et du triangle, les points de l'arete commune
/// se placent a mi-chemin

/// appel clavier touche 'C'

void ColleMilieu(Dart d, Dart e)
{

}



/// Fonction qui construite une "maison" (un carré et un triangle collé)
/// faire la topologie puis plonger le tout
/// on renvoit le brin du carre qui est colle au triangle
/// Utiliser embedCell

Dart Maison()
{
sylvain thery's avatar
sylvain thery committed
149
	return Dart::nil();
Pierre Kraemer's avatar
Pierre Kraemer committed
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
}


/// decouper le carre de la maison en 2 carre (un a gauche un a droite)
/// le triangle du haut devient un carre (de forme triangulaire
/// essayer de couper d'abord uniquement les arêtes pour voir ce qui se passe.
/// deplacer les deux nouveaux sommets 
/// Fonctions à utiliser:
/// 	cutEdge(brin): coupe une arête en deux: *---  devient *---*---
///		cutFace(b1,b2): coupe une face en deux, la nouvelle arête relie les deux sommets portes par b1 et b2

///touche 'x' on selectionne les 2 aretes a couper

void Decoupage(Dart d, Dart dd)
{
}



/// appliquer une homothetie a une face (0.95 par ex) a partir d'un brin
/// Attention on ne connait pas le nombre de cotes de face !!
/// Indice: 2 passes: calculer le centre, puis bouger les sommets
/// appel clavier  touche 'r' pout le carre
/// appel clavier  touche 'R' pout le triangle
void Reduction(Dart e)
{


}


/// faire touner une face !!!
/// chaque sommet avance vers le suivant
/// appel clavier touche 'T' pout le carre
/// appel clavier touche 'U' pout le triangle


void Tourne(Dart d)
{

}



/// Fonction de creation de la carte (appelee par le main)

void createMap()
{
//	d_carre = Carre();
//	d_tri = Triangle();
// 	d_maison = Maison();

}


/// Coupe une face carre en 2 en utilisant cutEdge et splitFace 
/// splitFace(d1,d2): le suivant (phi1) de d1 devient celui de d2
/// et inversement: faire un dessin

void coupe_carre(Dart dd)
{

}





/// Variables pour le picking
PFP::VEC3 rayA;
PFP::VEC3 rayB;
std::vector<PFP::VEC3> inters;
std::vector<Dart> d_faces;
std::vector<Dart> d_edges;
std::vector<Dart> d_vertices;



228
void MyQT::drawSelected()
Pierre Kraemer's avatar
Pierre Kraemer committed
229
{
230

Pierre Kraemer's avatar
Pierre Kraemer committed
231
232
233
	typedef Dart Dart;

// FACES
234
235
236

	m_ds->newList(GL_COMPILE_AND_EXECUTE);
	m_ds->lineWidth(5.0f);
Pierre Kraemer's avatar
Pierre Kraemer committed
237
238
	for(unsigned int i=0; i < d_faces.size(); ++i)
	{
239
		m_ds->begin(GL_POLYGON);
Pierre Kraemer's avatar
Pierre Kraemer committed
240
241
		// fait varier la couleur du plus pres au plus loin
		float c = float (i) / float (d_faces.size());
242
		m_ds->color3f(1.0f - c , 0.0f, c);
Pierre Kraemer's avatar
Pierre Kraemer committed
243
244
245
246
247

		Dart d = d_faces[i];
		do
		{
			const PFP::VEC3& P = position[d];
248
			m_ds->vertex(P);
Pierre Kraemer's avatar
Pierre Kraemer committed
249
250
			d = myMap.phi1(d);
		} while (d!=d_faces[i]);
251
252

		m_ds->end();
Pierre Kraemer's avatar
Pierre Kraemer committed
253
254
255
	}


256
257
258
//edges
	m_ds->begin(GL_LINES);
	m_ds->lineWidth(5.0f);
Pierre Kraemer's avatar
Pierre Kraemer committed
259
260
261
262
	for(unsigned int i=0; i < d_edges.size(); ++i)
	{
		// fait varier la couleur du plus pres au plus loin
		float c = float (i) / float (d_edges.size());
263
		m_ds->color3f(1.0f - c , c ,0.);
Pierre Kraemer's avatar
Pierre Kraemer committed
264
265
266

		Dart d = d_edges[i];
		const PFP::VEC3& P = position[d];
267
		m_ds->vertex(P);
Pierre Kraemer's avatar
Pierre Kraemer committed
268
269
		d = myMap.phi1(d);
		const PFP::VEC3& Q =  position[d];
270
		m_ds->vertex(Q);
Pierre Kraemer's avatar
Pierre Kraemer committed
271
	}
272
273
	m_ds->end();

Pierre Kraemer's avatar
Pierre Kraemer committed
274
275
276

//VERTICES
//edges
277
278
	m_ds->pointSize(9.0f);
	m_ds->begin(GL_POINTS);
Pierre Kraemer's avatar
Pierre Kraemer committed
279
280
281
282
283

	for(unsigned int i=0; i < d_vertices.size(); ++i)
	{
		// fait varier la couleur du plus pres au plus loin
		float c = float (i) / float (d_vertices.size());
284
		m_ds->color3f(1.0f - c , 0., c);
Pierre Kraemer's avatar
Pierre Kraemer committed
285
286
		Dart d = d_vertices[i];
		const PFP::VEC3& P = position[d];
287
		m_ds->vertex(P);
Pierre Kraemer's avatar
Pierre Kraemer committed
288
	}
289
290
291
	m_ds->end();

	m_ds->endList();
Pierre Kraemer's avatar
Pierre Kraemer committed
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
	
	for(unsigned int i=0; i < selected_darts.size(); ++i)
	{
		// fait varier la couleur du plus pres au plus loin
		Dart d = selected_darts[i];
		switch(i)
		{
			case 0:
				m_render_topo->overdrawDart(d, 5, 1.0f,0.0f,0.0f);
				break;
			case 1:
				m_render_topo->overdrawDart(d, 5, 0.0f,1.0f,0.0f);
				break;
			case 2:
				m_render_topo->overdrawDart(d, 5, 0.0f,0.0f,1.0f);
				break;
			case 3:
				m_render_topo->overdrawDart(d, 5, 1.0f,1.0f,0.0f);
				break;
			case 4:
				m_render_topo->overdrawDart(d, 5, 1.0f,0.0f,1.0f);
				break;
			case 5:
				m_render_topo->overdrawDart(d, 5, 0.0f,1.0f,1.0f);
				break;
			default:
				break;
		}
	}

}


325
326
327
328
329
330
331
332
333
void MyQT::cb_initGL()
{
	// choose to use GL version 2
	Utils::GLSLShader::setCurrentOGLVersion(2);

	// create the render
	m_render = new Algo::Render::GL2::MapRender();
	m_render_topo = new Algo::Render::GL2::TopoRenderMapD() ;

334
335
	m_ds = new Utils::Drawer();

336
337
338
339
340
341
342
343
	// create VBO for position
	m_positionVBO = new Utils::VBO();
	m_normalVBO = new Utils::VBO();

	m_shader = new Utils::ShaderPhong();
	m_shader->setAttributePosition(m_positionVBO);
	m_shader->setAttributeNormal(m_normalVBO);
	m_shader->setDiffuse(Geom::Vec4f(0.,0.6,0.,0.));
344
	m_shader->setSpecular(Geom::Vec4f(0.,0.0,0.,0.)); // no specular
345
346
347
348
349
350
351
352

	// using simple shader with color
	m_shader2 = new Utils::ShaderSimpleColor();
	m_shader2->setAttributePosition(m_positionVBO);
	m_shader2->setColor(Geom::Vec4f(0.,0.1,0.,0.));
	registerRunning(m_shader);
	registerRunning(m_shader2);
}
Pierre Kraemer's avatar
Pierre Kraemer committed
353
354
355
356




357
void MyQT::cb_redraw()
Pierre Kraemer's avatar
Pierre Kraemer committed
358
359
360
{

	drawSelected();
361
362
363
	if (renderTopo)
	{
		glEnable( GL_POLYGON_OFFSET_FILL );
364
		glPolygonOffset( 1.0f, 1.0f );
365
366
		m_render_topo->drawTopo();
	}
Pierre Kraemer's avatar
Pierre Kraemer committed
367
368

	glEnable( GL_POLYGON_OFFSET_FILL );
369
370
371
372
373
	glPolygonOffset( 1.5f, 1.5f );



	glPolygonOffset( 2.0f, 2.0f );
374
375
	glLineWidth(1.0f);
	m_render->draw(m_shader2,Algo::Render::GL2::LINES) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
376

377

Pierre Kraemer's avatar
Pierre Kraemer committed
378
	/// Rendu faces pleines
379
380
	glEnable(GL_CULL_FACE);
	glFrontFace(GL_CCW);
Pierre Kraemer's avatar
Pierre Kraemer committed
381
382
383
	glPolygonMode(GL_FRONT,GL_FILL);
	glPolygonMode(GL_BACK,GL_NONE);

384
	m_render->draw(m_shader,Algo::Render::GL2::TRIANGLES) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
385
386
387
388

	glDisable( GL_POLYGON_OFFSET_FILL );
}

389
void MyQT::cb_keyPress(int keycode)
Pierre Kraemer's avatar
Pierre Kraemer committed
390
{
391
392
	typedef Dart Dart;

393
394
395
396
	int x,y;
	glMousePosition(x,y);
	std::cout << x << " , "<< y << std::endl;

Pierre Kraemer's avatar
Pierre Kraemer committed
397
398
399
400
	switch(keycode)
	{
	case 't':
		renderTopo = !renderTopo;
401
402
403
404
405
		if (renderTopo)
			statusMsg("Render Topology");
		else
			statusMsg("");
		updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
406
407
408
409
		break;

	case '0':
		selected_darts.clear();
410
411
		statusMsg("Cleanning selected darts");
		updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
412
413
414
415
416
		break;

	case 'd':
	{
		if (selected_darts.size()>5) 
417
418
		{
			statusMsg("Already six darts selected");
Pierre Kraemer's avatar
Pierre Kraemer committed
419
			break;
420
		}
Pierre Kraemer's avatar
Pierre Kraemer committed
421
422
423
424
425
426
427
428
429
430
431


		/// calcul du rayon
		getOrthoScreenRay(x,y,rayA,rayB);
		PFP::VEC3 AB = rayB-rayA;

		/// recuperation des faces intersectees
		d_faces.clear();
		d_edges.clear();
		d_vertices.clear();
		std::vector<Dart> darts;
432
		Algo::Selection::dartsRaySelection<PFP>(myMap, position, rayA, AB, darts, SelectorTrue());
433
		selected_darts.push_back(darts[0]);
Pierre Kraemer's avatar
Pierre Kraemer committed
434

435
		updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
436
437
438
439
440
441
442
443
444
445
446
447
448
449
		break;
	}

	case 'D':
	{
		/// calcul du rayon
		getOrthoScreenRay(x,y,rayA,rayB);
		PFP::VEC3 AB = rayB-rayA;

		/// recuperation des faces intersectees
		d_faces.clear();
		d_edges.clear();
		d_vertices.clear();
		std::vector<Dart> darts;
450
		Algo::Selection::dartsRaySelection<PFP>(myMap, position, rayA, AB, darts, SelectorTrue());
Pierre Kraemer's avatar
Pierre Kraemer committed
451
452
453
454
455
456
457
458
459
460

		if (!darts.empty()) 
		{
			std::stringstream ss;
			Dart d1 = myMap.phi1(darts[0]);
			Dart d2 = myMap.phi2(darts[0]);
			ss << "dart:" << darts[0].index<<" /phi1:"<< d1.index<<" /phi2:"<< d2.index;

			const PFP::VEC3& P = position[darts[0]];
			ss << " /Emb:" << P;
461
			statusMsg(ss.str().c_str());
Pierre Kraemer's avatar
Pierre Kraemer committed
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
		}
		break;
	}

	case 'f':
	{
		/// calcul du rayon
		getOrthoScreenRay(x,y,rayA,rayB);
		PFP::VEC3 AB = rayB-rayA;

		/// recuperation des faces intersectees
		d_faces.clear();
		d_edges.clear();
		d_vertices.clear();
	
477
		Algo::Selection:: facesRaySelection<PFP>(myMap, position, SelectorTrue(), rayA, AB, d_faces);
Pierre Kraemer's avatar
Pierre Kraemer committed
478
479


480
481
		if (!d_faces.empty())
		{
Pierre Kraemer's avatar
Pierre Kraemer committed
482
			std::stringstream ss;
483
484
			ss << "Face " << d_faces[0].index/3;
			statusMsg(ss.str().c_str());
485
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
486
487
488
489
490
491
492
		}
		break;
	}

	case 'a':
	{
		/// calcul du rayon
493
		float dist = getOrthoScreenRay(x,y,rayA,rayB);
Pierre Kraemer's avatar
Pierre Kraemer committed
494
495
496
497
498
499
		PFP::VEC3 AB = rayB-rayA;

		d_faces.clear();
		d_edges.clear();
		d_vertices.clear();

500
		Algo::Selection::edgesRaySelection<PFP>(myMap, position, SelectorTrue(), rayA, AB, d_edges,dist);
Pierre Kraemer's avatar
Pierre Kraemer committed
501
502
503
504
505

		if (!d_edges.empty())
		{
			std::stringstream ss;
			Dart dd = myMap.phi2(d_edges[0]);
506
			ss << "Arete:  dart: " << d_edges[0].index<<" phi1: "<< myMap.phi1(d_edges[0]).index;
Pierre Kraemer's avatar
Pierre Kraemer committed
507
			if (dd != d_edges[0])
508
509
				ss << std::endl<< " phi2: " << dd.index<<" phi1: "<< myMap.phi1(dd).index;
			statusMsg(ss.str().c_str());
510
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
511
512
513
514
515
516
517
518
		}

		break;
	}

	case 's':
	{
		/// Rayon
519
		float dist = getOrthoScreenRay(x,y,rayA,rayB);
Pierre Kraemer's avatar
Pierre Kraemer committed
520
521
522
523
524
525
		PFP::VEC3 AB = rayB-rayA;

		d_faces.clear();
		d_edges.clear();
		d_vertices.clear();

526
		Algo::Selection::verticesRaySelection<PFP>(myMap, position,rayA, AB, d_vertices,dist,SelectorTrue());
Pierre Kraemer's avatar
Pierre Kraemer committed
527
528
529
530

		if (!d_vertices.empty())
		{
			std::stringstream ss;
531
532
			ss << "Sommet:  dart: " << d_vertices[0].index << ": " << position[d_vertices[0]];
			statusMsg(ss.str().c_str());
533
534

			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
535
536
537
538
539
540
541
542
543
		}

		break;
	}

	case 'r':
		if (!selected_darts.empty())
		{
			Reduction(selected_darts[0]);
544
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
545
546
547
548
549
550
551
		}
		break;

	case 'T':
		if (!selected_darts.empty())
		{
			Tourne(selected_darts[0]);
552
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
553
554
555
556
557
558
559
560
		}
		break;

	case 'c':
		
		if (selected_darts.size()>=2)
		{
			Colle(selected_darts[0], selected_darts[1]);
561
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
562
563
564
565
566
567
568
		}
		break;

	case 'C':
		if (selected_darts.size()>=2)
		{
			ColleMilieu(selected_darts[0], selected_darts[1]);
569
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
570
571
572
573
574
575
576
		}
		break;

	case 'x':
		if (selected_darts.size()>=2)
		{
			Decoupage(selected_darts[0], selected_darts[1]);
577
			updateGL();
Pierre Kraemer's avatar
Pierre Kraemer committed
578
579
580
581
582
583
584
585
		}
		break;

	}
}

int main(int argc, char **argv)
{
586
587
588
589
	// interface:
	QApplication app(argc, argv);
	MyQT sqt;

Pierre Kraemer's avatar
Pierre Kraemer committed
590

Pierre Kraemer's avatar
Pierre Kraemer committed
591
	if (argc == 2)
Pierre Kraemer's avatar
Pierre Kraemer committed
592
	{
Pierre Kraemer's avatar
Pierre Kraemer committed
593
594
595
596
		std::vector<std::string> attrNames ;
		Algo::Import::importMesh<PFP>(myMap, argv[1], attrNames) ;
		position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
		normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
597
		Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
Pierre Kraemer's avatar
Pierre Kraemer committed
598
599
600
	}
	else
	{
Pierre Kraemer's avatar
Pierre Kraemer committed
601
602
		position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
		normal = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal");
Pierre Kraemer's avatar
Pierre Kraemer committed
603
604
605
606
607
608
		createMap();
	}

	if (myMap.getNbDarts()==0)
		exit(0);

609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
	// caclul de la bounding box de la scene a afficher
	Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
	float lWidthObj = std::max<PFP::REAL>(std::max<PFP::REAL>(bb.size(0), bb.size(1)), bb.size(2));
	Geom::Vec3f lPosObj = (bb.min() +  bb.max()) / PFP::REAL(2);

	// envoit info BB a l'interface
	sqt.setParamObject(lWidthObj,lPosObj.data());

	// show 1 pour optenir le contexte GL
	sqt.show();

	// update du VBO position (contexte GL necessaire)
	sqt.m_positionVBO->updateData(position);
	sqt.m_normalVBO->updateData(normal);

	// update des primitives du renderer
	SelectorTrue allDarts;
	sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
	sqt.m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES);

	sqt.m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f);
Pierre Kraemer's avatar
Pierre Kraemer committed
630

631
632
	// show final pour premier redraw
	sqt.show();
Pierre Kraemer's avatar
Pierre Kraemer committed
633

634
635
	// et on attend la fin.
	return app.exec();
Pierre Kraemer's avatar
Pierre Kraemer committed
636
}