Jump to content
  • Advertisement

Archived

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

Mihail121

Object selection

This topic is 5924 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

Hi,i haven''t net for quite a while so i coudn''t answer the object selection problems but now it''s different.So let''s get to the point.When you are trying to select some object or a singe pixel that are quite away in the frustrum you can use a bigger selection viewing volume.This is done by the following function call: gluPickMatrix(m_pos.x,viewport[3] - m_pos.y,3,3,viewport) where viewport represents the current viewing volume and can be get with the function glGetIntegerv(GL_VIEWPORT,viewport).The m_pos.x and m_pos.y are the center of the selection volume that means you have a 3 sided cube with center m_pos.x and m_pos.y.Everything that is in that cube is a selection hit.There are very easy tricks to get which object is nearest to the viewer.Some of that tips can be readed at http://www.gametutorials.com. Another way to get which object is selected with the mouse is the FEEDBACK buffer but that''s alot harder. Take care Minski The pain is coming...this sommer!!!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!