[vtkusers] OpenGL rendering of marchingCubes filtered volume
giuseppe.tommasone at tiscali.it
giuseppe.tommasone at tiscali.it
Tue Sep 26 09:44:54 EDT 2006
I solved my recent problem with getting a volume contour vertices (see
my earlier messages) thanks to help from this mailing list, but i still
can't do what i really wanted to: when i filter
vtkStructuredPointsReader's output with a vtkMarchingCubes filter, the
output is rendered the right way by the vtk renderer, but when i do the
following:
//Store all the points in a vector
fillVector(&pointsVector, marchingCubes->GetOutput()->GetPoints());
void display() {
glBegin(GL_TRIANGLES);
for(iterator it = pointsVector.begin(); it != pointsVector.end();
it++) {
glVertex3f(/*points coordinates*/);
}
glEnd();
}
the result isn't by far the same, even with backface removal and
lighting enabled, even though if i render the points as GL_POINTS i can
see that the vertices are right...it looks like if the vertices are
shuffled up and thus sequentially rendering them as triangles mixes up
the lines...i tried sorting the vector, but it had no effect...so the
question is: in which order are the vertices stored in GetPoints(), and
how can i render them via OpenGL?
Thanks in advance
Mattia Tommasone
Naviga e telefona senza limiti con Tiscali
Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
http://abbonati.tiscali.it/adsl/
More information about the vtkusers
mailing list