
Unprojecting vertices ???
Hi, i am working on object selection and translating/rotating/scaling using the mouse. Everything goes well till now. Everything works except moving the objects properly. I have been struggling getting an appropriate formula for moving objects on a rotated/translated axis (x/y, y/z or x/z) when the mousecursor moves, keeping the once clicked spot on the model directly underneeth the cursor. I am now close, but the code is a MESS
, actually it's so messy i will have to write it again.
I read on this forum a while ago that Microsoft added an unproject function to their matrix class. This would be a simple and fast solution if i could add an UnProject function to my own matrix class.
Does anyone now of some articles about unprojecting ?
Thanks in advance!
[edited by - Tree Penguin on February 11, 2004 5:39:16 AM]

Hi!
I think what you need it gluUnProject().
cya,
Drag0n
-----------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook
My future web presence: Dave''s Programming Resources
I think what you need it gluUnProject().
cya,
Drag0n
-----------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook
My future web presence: Dave''s Programming Resources
-----------------------------"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook"...nobody ever accused English pronounciation and spelling of being logical." -- Bjarne Stroustrup"...the war on terror is going badly because, if you where to compare it to WWII, it's like America being attacked by Japan, and responding by invading Brazil." -- Michalson
Too bad i am using my own matrix class all over my project, i don''t think i will be able to use the gluUnProject function
unless i could SET the OpenGL matrix
, does anyone know how?
Anyway i am still interested in articles/info un unprojecting (always handy to know).
Thanks in advance.


Anyway i am still interested in articles/info un unprojecting (always handy to know).
Thanks in advance.
quote:glLoadMatrix();
Original post by Tree Penguin
Too bad i am using my own matrix class all over my project, i don''t think i will be able to use the gluUnProject functionunless i could SET the OpenGL matrix
, does anyone know how?
You might try reading gl redbook first next time

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement