topo_render.hpp 15.5 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps  *
* version 0.1                                                                  *
4
* Copyright (C) 2009-2011, IGG Team, LSIIT, University of Strasbourg           *
Pierre Kraemer's avatar
Pierre Kraemer committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
*                                                                              *
* 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.           *
*                                                                              *
20
* Web site: http://cgogn.u-strasbg.fr/                                         *
Pierre Kraemer's avatar
Pierre Kraemer committed
21 22 23 24 25 26 27
* Contact information: cgogn@unistra.fr                                        *
*                                                                              *
*******************************************************************************/

#include <limits>
#include "Topology/generic/autoAttributeHandler.h"

untereiner's avatar
untereiner committed
28 29
#include "Geometry/vector_gen.h"

Pierre Kraemer's avatar
Pierre Kraemer committed
30 31 32 33 34 35 36 37 38
namespace CGoGN
{

namespace Algo
{

namespace Render
{

Sylvain Thery's avatar
Sylvain Thery committed
39
namespace GL1
Pierre Kraemer's avatar
Pierre Kraemer committed
40 41 42
{

template <typename PFP>
untereiner's avatar
untereiner committed
43
void renderTopoMD2(typename PFP::MAP& map, const typename PFP::TVEC3& positions, bool drawPhi1, bool drawPhi2, float ke, float kf)
Pierre Kraemer's avatar
Pierre Kraemer committed
44 45 46 47
{
	typedef typename PFP::VEC3 VEC3;
	typedef typename PFP::REAL REAL;
	
untereiner's avatar
untereiner committed
48 49 50 51
	AutoAttributeHandler<Geom::Vec3f> fv1(map, DART);
	AutoAttributeHandler<Geom::Vec3f> fv11(map, DART);
	AutoAttributeHandler<Geom::Vec3f> fv2(map, DART);
	AutoAttributeHandler<Geom::Vec3f> vert(map, DART);
Pierre Kraemer's avatar
Pierre Kraemer committed
52 53

	glLineWidth(2.0f);
Pierre Kraemer's avatar
Pierre Kraemer committed
54
	glColor3f(0.9f,0.9f,0.9f);
Pierre Kraemer's avatar
Pierre Kraemer committed
55 56
	glBegin(GL_LINES);

untereiner's avatar
untereiner committed
57 58
	DartMarker mf(map);
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
Pierre Kraemer's avatar
Pierre Kraemer committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
	{
		if (!mf.isMarked(d))
		{
			std::vector<VEC3> vecPos;
			vecPos.reserve(16);

			std::vector<VEC3> vecF1;
			vecF1.reserve(16);

			// store the face & center
			VEC3 center(0.0f,0.0f,0.0f);
			Dart dd = d;
			do
			{
				const VEC3& P = positions[d];
				vecPos.push_back(positions[d]);
				center += P;
untereiner's avatar
untereiner committed
76
				d = map.phi1(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
			}while (d!=dd);
			center /= REAL(vecPos.size());

			//shrink the face
			unsigned int nb = vecPos.size();
			float k = 1.0f - kf;
			for (unsigned int i=0; i<nb; ++i)
			{
				vecPos[i] = center*k + vecPos[i]*kf;
			}
			vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop

			k = 1.0f - ke;
			for (unsigned int i=0; i<nb; ++i)
			{
				VEC3 P = vecPos[i]*ke + vecPos[i+1]*k;
				VEC3 Q = vecPos[i+1]*ke + vecPos[i]*k;
				glVertex3fv(P.data());
				glVertex3fv(Q.data());
				vert[d] = P;
				VEC3 f = P*0.5f + Q*0.5f;
				fv2[d] = f;
				f = P*0.1f + Q*0.9f;
				fv1[d] = f;
				f = P*0.9f + Q*0.1f;
				fv11[d] = f;
untereiner's avatar
untereiner committed
103
				d = map.phi1(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
104
			}
105
			mf.markOrbit(FACE, d);
Pierre Kraemer's avatar
Pierre Kraemer committed
106 107 108
		}
	}

untereiner's avatar
untereiner committed
109
	for(Dart d = map.begin(); d != map.end(); map.next(d))
Pierre Kraemer's avatar
Pierre Kraemer committed
110
	{
untereiner's avatar
untereiner committed
111
		Dart e = map.phi2(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
112 113 114 115 116 117 118 119
		if ((d<e) && drawPhi2)
		{
			glColor3f(1.0,0.0,0.0);
			glVertex3fv(fv2[d].data());
			glVertex3fv(fv2[e].data());
		}
		if (drawPhi1)
		{
untereiner's avatar
untereiner committed
120
			e = map.phi1(d);
Pierre Kraemer's avatar
Pierre Kraemer committed
121 122 123 124 125 126 127 128 129 130 131
			glColor3f(0.0f,1.0f,1.0f);
			glVertex3fv(fv1[d].data());
			glVertex3fv(fv11[e].data());
		}
	}
	
	glEnd(); // LINES

	glPointSize(5.0f);
	glColor3f(0.0f,0.0f,0.0f);
	glBegin(GL_POINTS);
untereiner's avatar
untereiner committed
132
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
Pierre Kraemer's avatar
Pierre Kraemer committed
133 134 135 136 137 138 139
	{
		glVertex3fv(vert[d].data());
	}
	glEnd();

}

untereiner's avatar
untereiner committed
140 141 142 143 144 145 146 147 148 149 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 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
template <typename PFP>
void renderTopoMD3(typename PFP::MAP& map, typename PFP::TVEC3& positions, bool drawPhi1, bool drawPhi2, bool drawPhi3, float ke, float kf, float kv)
{
	typedef typename PFP::VEC3 VEC3;
	typedef typename PFP::REAL REAL;

	AutoAttributeHandler<Geom::Vec3f> fv1(map, DART);
	AutoAttributeHandler<Geom::Vec3f> fv11(map, DART);
	AutoAttributeHandler<Geom::Vec3f> fv2(map, DART);
	AutoAttributeHandler<Geom::Vec3f> fv2x(map, DART);
	AutoAttributeHandler<Geom::Vec3f> vert(map, DART);

	int m_nbDarts = 0;

	// table of center of volume
	std::vector<VEC3> vecCenters;
	vecCenters.reserve(1000);
	// table of nbfaces per volume
	std::vector<unsigned int> vecNbFaces;
	vecNbFaces.reserve(1000);
	// table of face (one dart of each)
	std::vector<Dart> vecDartFaces;
	vecDartFaces.reserve(map.getNbDarts()/4);

	DartMarker mark(map);					// marker for darts
	for (Dart d = map.begin(); d != map.end(); map.next(d))
	{
			CellMarkerStore markVert(map, VERTEX);		//marker for vertices
			VEC3 center(0, 0, 0);
			unsigned int nbv = 0;
			unsigned int nbf = 0;
			std::list<Dart> visitedFaces;	// Faces that are traversed
			visitedFaces.push_back(d);		// Start with the face of d

			// For every face added to the list
			for (std::list<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
			{
				if (!mark.isMarked(*face))		// Face has not been visited yet
				{
					// store a dart of face
					vecDartFaces.push_back(*face);
					nbf++;
					Dart dNext = *face ;
					do
					{
						if (!markVert.isMarked(dNext))
						{
							markVert.mark(dNext);
							center += positions[dNext];
							nbv++;
						}
						mark.mark(dNext);					// Mark
						m_nbDarts++;
						Dart adj = map.phi2(dNext);				// Get adjacent face
						if (adj != dNext && !mark.isMarked(adj))
							visitedFaces.push_back(adj);	// Add it
						dNext = map.phi1(dNext);
					} while(dNext != *face);
				}
			}
			center /= typename PFP::REAL(nbv);
			vecCenters.push_back(center);
			vecNbFaces.push_back(nbf);
	}

 	glLineWidth(1.0f);
	glBegin(GL_LINES);
	glColor3f(1.0f,1.0f,1.0f);

	std::vector<Dart>::iterator face = vecDartFaces.begin();
	for (unsigned int iVol=0; iVol<vecNbFaces.size(); ++iVol)
	{
		for (unsigned int iFace = 0; iFace < vecNbFaces[iVol]; ++iFace)
		{
			Dart d = *face++;

			std::vector<VEC3> vecPos;
			vecPos.reserve(16);

			// store the face & center
			VEC3 center(0, 0, 0);
			Dart dd = d;
			do
			{
				const VEC3& P = positions[d];
				vecPos.push_back(P);
				//m_attIndex[d] = posDBI;
				center += P;
				d = map.phi1(d);
			} while (d != dd);
			center /= REAL(vecPos.size());

			//shrink the face
			unsigned int nb = vecPos.size();
			float okf = 1.0f - kf;
			float okv = 1.0f - kv;
			for (unsigned int i = 0; i < nb; ++i)
			{
				vecPos[i] = vecCenters[iVol]*okv + vecPos[i]*kv;
				vecPos[i] = center*okf + vecPos[i]*kf;
			}
			vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop

			// compute position of points to use for drawing topo
			float oke = 1.0f - ke;
			for (unsigned int i = 0; i < nb; ++i)
			{
				VEC3 P = vecPos[i]*ke + vecPos[i+1]*oke;
				VEC3 Q = vecPos[i+1]*ke + vecPos[i]*oke;

				vert[d] = P;

				glVertex3fv(P.data());
				glVertex3fv(Q.data());

				fv1[d] = P*0.1f + Q*0.9f;
				fv11[d] = P*0.9f + Q*0.1f;

				fv2[d] = P*0.52f + Q*0.48f;
				fv2x[d] = P*0.48f + Q*0.52f;

				d = map.phi1(d);
			}

		}
	}


	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		Dart e = map.phi2(d);
		if ((d<e) && drawPhi2)
		{
			glColor3f(1.0,0.0,0.0);
			glVertex3fv(fv2[d].data());
			glVertex3fv(fv2[e].data());
		}

		e = map.phi3(d);
		if ((d<e) && drawPhi3)
		{
			glColor3f(1.0,1.0,0.0);
			glVertex3fv(fv2[d].data());
			glVertex3fv(fv2[e].data());
		}
		if (drawPhi1)
		{
			e = map.phi1(d);
			glColor3f(0.0f,1.0f,1.0f);
			glVertex3fv(fv1[d].data());
			glVertex3fv(fv11[e].data());
		}
	}

	glEnd(); // LINES

	glPointSize(5.0f);
	glColor3f(0.0f,0.0f,0.0f);
	glBegin(GL_POINTS);
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
	{
		glVertex3fv(vert[d].data());
	}
	glEnd();

}

307
template <typename PFP>
Thomas's avatar
Thomas committed
308
void renderTopoGMD2(typename PFP::MAP& map, const typename PFP::TVEC3& positions, bool drawBeta0, bool drawBeta1, bool drawBeta2, float kd, float ke, float kf)
309 310 311 312
{
	typedef typename PFP::VEC3 VEC3;
	typedef typename PFP::REAL REAL;

Thomas's avatar
Thomas committed
313 314
	AutoAttributeHandler<Geom::Vec3f> posBeta1(map, DART);
	AutoAttributeHandler<Geom::Vec3f> posBeta2(map, DART);
315 316
	AutoAttributeHandler<Geom::Vec3f> vert(map, DART);

Thomas's avatar
Thomas committed
317 318
	glLineWidth(2.0f);
	glColor3f(0.9f,0.9f,0.9f);
319 320
	glBegin(GL_LINES);

Thomas's avatar
Thomas committed
321
	DartMarker mf(map);
Thomas's avatar
Thomas committed
322
	//draw all darts and potentially all beta0
Thomas's avatar
Thomas committed
323
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
324
	{
Thomas's avatar
Thomas committed
325
		if (!mf.isMarked(d))
326 327
		{
			std::vector<VEC3> vecPos;
328
			vecPos.reserve(32);
329 330

			// store the face & center
Thomas's avatar
Thomas committed
331
			VEC3 center(0);
332 333 334
			Dart dd = d;
			do
			{
Thomas's avatar
Thomas committed
335 336
				const VEC3& P = positions[dd];
				vecPos.push_back(positions[dd]);
337
				center += P;
Thomas's avatar
Thomas committed
338 339
				dd = map.phi1(dd);
			} while (dd!=d);
340 341 342 343
			center /= REAL(vecPos.size());

			//shrink the face
			unsigned int nb = vecPos.size();
Thomas's avatar
Thomas committed
344 345 346
			float k = 1.0f - kf;
			for (unsigned int i=0; i<nb; ++i)
				vecPos[i] = center*k + vecPos[i]*kf;
Thomas's avatar
Thomas committed
347

348 349
			vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop

Thomas's avatar
Thomas committed
350 351
			k = 1.0f - ke;
			for (unsigned int i=0; i<nb; ++i)
352
			{
Thomas's avatar
Thomas committed
353 354
				VEC3 P = vecPos[i]*ke + vecPos[i+1]*k;
				VEC3 Q = vecPos[i+1]*ke + vecPos[i]*k;
Thomas's avatar
Thomas committed
355 356
				VEC3 P_mid = P+(Q-P)*kd*0.5f;
				VEC3 Q_mid = Q+(P-Q)*kd*0.5f;
357
				glVertex3fv(P.data());
Thomas's avatar
Thomas committed
358 359 360 361 362 363 364 365 366 367
				glVertex3fv(P_mid.data());

				if(drawBeta0)
				{
					glColor3f(0.0f,0.0f,1.0f);
					glVertex3fv(P_mid.data());
					glVertex3fv(Q_mid.data());
				}

				glColor3f(0.9f,0.9f,0.9f);
368
				glVertex3fv(Q.data());
Thomas's avatar
Thomas committed
369
				glVertex3fv(Q_mid.data());
Thomas's avatar
Thomas committed
370
				vert[d] = P;
Thomas's avatar
Thomas committed
371

372
				posBeta2[d] = P*0.5f + P_mid*0.5f;
Thomas's avatar
Thomas committed
373

374
				posBeta2[map.beta0(d)] = Q*0.5f + Q_mid*0.5f;
Thomas's avatar
Thomas committed
375

376 377
				posBeta1[d] = P*0.9f + P_mid*0.1f;
				posBeta1[map.beta0(d)] = Q*0.9f + Q_mid*0.1f;
378 379
				d = map.phi1(d);
			}
Thomas's avatar
Thomas committed
380
			mf.markOrbit(FACE, d);
381 382 383
		}
	}

Thomas's avatar
Thomas committed
384
	//draw links beta 1 and beta 2
385 386 387
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		Dart e = map.beta2(d);
Thomas's avatar
Thomas committed
388
		if (drawBeta2)
389 390
		{
			glColor3f(1.0,0.0,0.0);
Thomas's avatar
Thomas committed
391 392
			glVertex3fv(posBeta2[d].data());
			glVertex3fv(posBeta2[e].data());
393 394 395 396 397 398
		}

		e = map.beta1(d);
		if ((d<e) && drawBeta1)
		{
			glColor3f(0.0f,1.0f,1.0f);
Thomas's avatar
Thomas committed
399 400
			glVertex3fv(posBeta1[d].data());
			glVertex3fv(posBeta1[e].data());
401 402 403 404
		}
	}
	glEnd(); // LINES

Thomas's avatar
Thomas committed
405
	//draw vertices
406 407 408 409 410 411 412 413 414 415 416
	glPointSize(5.0f);
	glColor3f(0.0f,0.0f,0.0f);
	glBegin(GL_POINTS);
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
	{
		glVertex3fv(vert[d].data());
	}
	glEnd();
}

template <typename PFP>
417
void renderTopoGMD3(typename PFP::MAP& map, const typename PFP::TVEC3& positions, bool drawBeta0, bool drawBeta1, bool drawBeta2, bool drawBeta3, float kd, float ke, float kf, float kv)
418 419 420 421
{
	typedef typename PFP::VEC3 VEC3;
	typedef typename PFP::REAL REAL;

422 423
	AutoAttributeHandler<Geom::Vec3f> posBeta1(map, DART);
	AutoAttributeHandler<Geom::Vec3f> posBeta2(map, DART); //beta 3 link is represented at the same location as beta2
424 425 426 427
	AutoAttributeHandler<Geom::Vec3f> vert(map, DART);

	// table of face (one dart of each)
	std::vector<Dart> vecDartFaces;
428 429 430 431 432 433 434 435 436
	vecDartFaces.reserve(map.getNbDarts()/6); //6 = nb of darts for tri mesh

	// table of degree of faces
	std::vector<unsigned int> vecNbFaces;
	vecNbFaces.reserve(vecDartFaces.size());

	// table of center of volume (to explode volumes)
	std::vector<VEC3> vecVolCenters;
	vecVolCenters.reserve(vecDartFaces.size()/4); // = nb of volumes for a tetra mesh
437 438

	DartMarker mark(map);					// marker for darts
439 440 441 442
//	CellMarker mVol(map, VOLUME);
	DartMarker mVol(map);

	//compute barycenter and get a dart by face
443 444
	for (Dart d = map.begin(); d != map.end(); map.next(d))
	{
445 446
		if(!mVol.isMarked(d))
		{
447 448 449
//			mVol.mark(d);
			mVol.markOrbit(VOLUME,d);

450
			CellMarkerStore markVert(map, VERTEX);		//marker for vertices
451 452
			VEC3 center(0);
			unsigned int nbVertices = 0;
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
			unsigned int nbf = 0;
			std::list<Dart> visitedFaces;	// Faces that are traversed
			visitedFaces.push_back(d);		// Start with the face of d

			// For every face added to the list
			for (std::list<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
			{
				if (!mark.isMarked(*face))		// Face has not been visited yet
				{
					// store a dart of face
					vecDartFaces.push_back(*face);
					nbf++;
					Dart dNext = *face ;
					do
					{
468 469
						mark.mark(dNext); // Mark

470 471 472 473
						if (!markVert.isMarked(dNext))
						{
							markVert.mark(dNext);
							center += positions[dNext];
474
							nbVertices++;
475
						}
476 477

						Dart adj = map.phi2(dNext); // add adjacent face if not done already
478
						if (adj != dNext && !mark.isMarked(adj))
479 480
							visitedFaces.push_back(adj);

481 482 483 484
						dNext = map.phi1(dNext);
					} while(dNext != *face);
				}
			}
485 486
			center /= typename PFP::REAL(nbVertices);
			vecVolCenters.push_back(center);
487
			vecNbFaces.push_back(nbf);
488
		}
489 490 491 492 493 494 495
	}

 	glLineWidth(1.0f);
	glBegin(GL_LINES);
	glColor3f(1.0f,1.0f,1.0f);

	std::vector<Dart>::iterator face = vecDartFaces.begin();
496
	//for each volume
497 498
	for (unsigned int iVol=0; iVol<vecNbFaces.size(); ++iVol)
	{
499
		//for each face
500 501 502 503 504 505 506 507
		for (unsigned int iFace = 0; iFace < vecNbFaces[iVol]; ++iFace)
		{
			Dart d = *face++;

			std::vector<VEC3> vecPos;
			vecPos.reserve(16);

			// store the face & center
508
			VEC3 center(0);
509 510 511
			Dart dd = d;
			do
			{
512
				const VEC3& P = positions[dd];
513 514
				vecPos.push_back(P);
				center += P;
515 516
				dd = map.phi1(dd);
			} while (dd != d);
517 518 519 520 521 522 523 524
			center /= REAL(vecPos.size());

			//shrink the face
			unsigned int nb = vecPos.size();
			float okf = 1.0f - kf;
			float okv = 1.0f - kv;
			for (unsigned int i = 0; i < nb; ++i)
			{
525
				vecPos[i] = vecVolCenters[iVol]*okv + vecPos[i]*kv;
526 527 528 529 530 531 532 533 534 535 536
				vecPos[i] = center*okf + vecPos[i]*kf;
			}
			vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop

			// compute position of points to use for drawing topo
			float oke = 1.0f - ke;
			for (unsigned int i = 0; i < nb; ++i)
			{
				VEC3 P = vecPos[i]*ke + vecPos[i+1]*oke;
				VEC3 Q = vecPos[i+1]*ke + vecPos[i]*oke;

537 538 539
				VEC3 P_mid = P+(Q-P)*kd*0.5f;
				VEC3 Q_mid = Q+(P-Q)*kd*0.5f;

540 541 542
				vert[d] = P;

				glVertex3fv(P.data());
543 544 545 546 547 548 549 550 551 552
				glVertex3fv(P_mid.data());

				if(drawBeta0)
				{
					glColor3f(0.0f,0.0f,1.0f);
					glVertex3fv(P_mid.data());
					glVertex3fv(Q_mid.data());
					glColor3f(1.0f,1.0f,1.0f);
				}

553
				glVertex3fv(Q.data());
554
				glVertex3fv(Q_mid.data());
555

556 557
				posBeta1[d] = P*0.9f + P_mid*0.1f;
				posBeta1[map.beta0(d)] = Q*0.9f + Q_mid*0.1f;
558

559 560
				posBeta2[d] = P*0.5f + P_mid*0.5f;
				posBeta2[map.beta0(d)] = Q*0.5f + Q_mid*0.5f;
561 562 563 564 565 566 567 568

				d = map.phi1(d);
			}

		}
	}


569
	//draw beta1, beta2, beta3 if required
570 571 572 573 574 575
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		Dart e = map.beta2(d);
		if ((d<e) && drawBeta2)
		{
			glColor3f(1.0,0.0,0.0);
576 577
			glVertex3fv(posBeta2[d].data());
			glVertex3fv(posBeta2[e].data());
578 579 580 581 582 583
		}

		e = map.beta3(d);
		if ((d<e) && drawBeta3)
		{
			glColor3f(1.0,1.0,0.0);
584 585
			glVertex3fv(posBeta2[d].data());
			glVertex3fv(posBeta2[e].data());
586 587 588 589 590 591 592
		}

		e = map.beta1(d);
		if ((d<e) && drawBeta1)
		{
			e = map.beta1(d);
			glColor3f(0.0f,1.0f,1.0f);
593 594
			glVertex3fv(posBeta1[d].data());
			glVertex3fv(posBeta1[e].data());
595 596 597 598 599
		}
	}

	glEnd(); // LINES

600
	//draw points of the map
601
	glPointSize(5.0f);
602
	glColor3f(1.0f,1.0f,1.0f);
603 604 605 606 607 608 609 610 611
	glBegin(GL_POINTS);
	for(Dart d = map.begin(); d!= map.end(); map.next(d))
	{
		glVertex3fv(vert[d].data());
	}
	glEnd();

}

Pierre Kraemer's avatar
Pierre Kraemer committed
612
} // namespace GL1
Pierre Kraemer's avatar
Pierre Kraemer committed
613

Pierre Kraemer's avatar
Pierre Kraemer committed
614 615 616 617 618
} // namespace Render

} // namespace Algo

} // namespace CGoGN
Pierre Kraemer's avatar
Pierre Kraemer committed
619