View Full Version : rotated points selection
04-22-2005, 05:11 AM
I drawn points in a window and used the select mode method shown in the "red book" to select them. But after I rotate those points, I am not able to select them again. I am new to opengl, so could someone teach me specificly how to do this?
04-23-2005, 01:49 PM
Selection should work with rotation. You have probably made a simple mistake somewhere.
Here's some code that works:
Maybe this will help you spot any mistakes, like not setting the pick matrix properly.
04-24-2005, 12:08 PM
Yes, your seguession helps. I didn't multiply the rotation matrix before setting the pick matrix. It works fine now. Thanks for your reply.
04-24-2005, 12:23 PM
Hey Chenghuayan, glad that helped.
It sounds like you building the modelview on the projection matrix stack, or something. That can work, but you might run into trouble with lighting, among other things.
Just so you know, you can set up the camera and object transformations just as you would without picking. The trick is applying the pick matrix transform before the usual projection matrix setup.
// Begin frame
... camera transforms as usual
... object transformations as usual
(Don't forget to push and pop the camera)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.