PDA

View Full Version : Transformations for Selection



snupinokio
11-02-2003, 12:20 AM
Hi All

I am writting a program that presents some 3D objects. It allows the user to rotate and translate object in space and also to select an object. Currently I use selection and feedback.
I thought if I could know the location in space of each primitive after transformation, i can gluUnProject the mouse (with winz = 0) and find the closest object without select buffer.

For this i need to implement the transformations myself. I implemented all exacept rotation around the Z global axis. I tried but it doens't work and i don't know why.
My questions are:
1. Do you think my idea for the selection can work?
2. Does anyone have a reference for implemented transformations?

Thank you All

cg-hci_novice
11-02-2003, 04:26 PM
Not sure I understand what you are doing since I am also learning but have you tried to locate some examples on http://nehe.gamedev.net for it?

irix6
11-04-2003, 11:19 AM
I had implemented similiar thing before; However, I projected the world coordinates of object to screen and check if the mouse cursor position is near the screen coordinates of object.