[Code] Update Mesh
This commit is contained in:
parent
96a0749d91
commit
8d28fef13d
1 changed files with 8 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue