Hi there,
I you mean it’s picking verticies from the other side of the mesh, use the normals of the verticies to see if the vertex is pointing towards or away from the screen. This is assuming you have normals for your verticies…
a posible method is once u have the vertices. draw them again with say glDepthFunc( GL_EQUAL) if they get drawn ie they pass the depth test , then they can be seen else there is geometry obscutring them so they fail the depth test.
int i = 0;
glBegin( GL_POINTS );
for (i=0; i < ss->nrPoints; ++i )
{
glVertex3f( (float) data[ i ]->x,
(float) data[ i ]->y,
(float) data[ i ]->z );
}
glEnd();
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
for (i=0; i < ss->nrPoints; ++i )
{
glPushName(i);
glBegin( GL_POINTS );
glVertex3f( (float) data[ i ]->x,
(float) data[ i ]->y,
(float) data[ i ]->z );
glEnd();
glPopName();
}
well for all the selected vertices.
run a line segment from each vertice to the camera + check if this linesegment intersects any polygons in the scene if so then the vertice cant be seen from the camera.
I was searching about selection, and I found this, will it not be possible to control witch is the correct vertex working with the Z value from the hit ?
Just an idea, if not, can some one correct me , why we can’t use this ?