Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Finding a vertex?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 zhech   Members   

122
Like
Likes
Like

Posted 14 August 2001 - 12:56 PM

How would I select a vertex? For example if I had a square how would I select one of the verteces?

#2 Sneftel   Senior Moderators   

1788
Like
Likes
Like

Posted 14 August 2001 - 01:22 PM

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.

#3 zhech   Members   

122
Like
Likes
Like

Posted 14 August 2001 - 06:44 PM

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.

#4 zedzeek   Members   

528
Like
Likes
Like

Posted 15 August 2001 - 10:19 AM

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.