Normal Vector under the mouse cursor

Hi there

I was wondering if someone can please help me with the following question:

I have a surface on the screen rendered with glquads. When the mouse cursor is over a point i can get the coordinates of the vertex using glUnproject. Is there a way that i can get the normal vector under the mouse cursor as well??

any advice will be MUCH appreciated!!

thank you in advance

Hi !

You cannot find the normal of a vertex because it does not have one, to find a normal of something you need 3 vertices, you can find the normal of a triangle, quad and so on, but in that case you could use picking to find the triangle, quad or whate ver that is under the mouse and then you can find the normal of that object.


Thanks for your reply

so would i need to have a look up table of some kind?

Do you know of any example code out there that can help me to get started?