Transformations for Selection

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

Not sure I understand what you are doing since I am also learning but have you tried to locate some examples on for it?

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.