Archived

This topic is now archived and is closed to further replies.

Finding a vertex?

This topic is 5967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m not sure what you mean by "select a vertex", so I''ll just give you generalities.

OpenGL operates in "immediate mode". What this means is that OpenGL itself will not care for the ongoing state of your 3d world. All it does is draw something on the screen and forget about it. (well-- not exactly, with display lists, but that''s a special situations). Because OGL has no concept of what vertices are currently in the world, therefore, the notion of "selecting" one is kind of a meaningless one.

Share this post


Link to post
Share on other sites
What I want to do is create a program to modify terrain. I want to be able to select one of the vertices of a tile like:

+---------+ <---- The plus sign is what I want to select.
| |
| |
| |
| |
+---------+

Then I want to change the height at which I render it by changing the heightmap. Or for that matter selecting a vertice of any shape or even be able to select a point regardless of the view. I want to allow the user to change the viewport and by rotating the object. Like in 3dstudio when selecting a vertex and then pulling it to design something.

(Selecting a vertex)
clicking the mouse on the screen and then highlighting the vertex closest to the point at which the user clicks.

Share this post


Link to post
Share on other sites
use the selection buffer. search the net for examples or look in the red book or glut. u can draw the points then use gluPickMatrix(..) to select an area

Share this post


Link to post
Share on other sites