From 8d28fef13d4144fddde80424d2dacbd0b565e61c Mon Sep 17 00:00:00 2001 From: Andre Meyering Date: Wed, 31 Oct 2018 15:41:28 +0100 Subject: [PATCH] [Code] Update Mesh --- Code/template_meshVisualisierung.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Code/template_meshVisualisierung.c b/Code/template_meshVisualisierung.c index 3198c0f..c965da1 100644 --- a/Code/template_meshVisualisierung.c +++ b/Code/template_meshVisualisierung.c @@ -68,26 +68,27 @@ void displaycloud(int modus) { int i = 0; float range[3]; - for (i = 0; i < 3; i++) - range[i] = cpointsmax[i] - cpointsmin[i]; + for (i = 0; i < 3; i++){ + range[i] = cpointsmax[i] - cpointsmin[i];} if (modus > 0) { if (modus == 1 || modus == 4) { // Display only the vertices ////////////////////// // TODO: set fill mode to render only the vertices + glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); ////////////////////// } if (modus == 2 || modus == 5) { // Display the outlines of the polygons ////////////////////// // TODO: set fill mode to render only outlines - + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); ////////////////////// } if (modus == 3 || modus == 6) { // Display filled polygons ////////////////////// // TODO: set fill mode to render filled polygons - + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); ///////////////////// } glBegin(GL_TRIANGLES); // using the polygone mode "GL_TRIANGLES" @@ -111,6 +112,9 @@ void displaycloud(int modus) // one triangle consists of 3 consecutive entries of ccoord, i.e. // first triangle consists of the vertices referenced in ccoord[0], ccords[1], ccoord[2]. + glVertex3f(cpoints[ccoord[i]*3],cpoints[ccoord[i]*3+1],cpoints[ccoord[i]*3+2]); + + ///////////////////////////////////////////////////////////////////// } glEnd();