I am making a C++/OpenGL utility (decidedly with out GLM), and I might like to know learn how to create a ray from the digicam eye to the mouse pointer, in addition to detect an intersection level from the ensuing ray onto a flat airplane.
– Digital camera place, digicam pitch/yaw, digicam’s Fwd vector
– mouse coordinates in pixel measurements (which I can convert to -1:+1 display house)
– A world system the place XY are the horizontal and Z is up
– A flat airplane the place Z=0
– My very own matrix class which is principally only a float and accessed (Get()) as a float*
– Fundamental matrix multiply operate, cross, dot product capabilities.
I am nonetheless making an attempt to be taught 3D math (this venture is considerably of a purpose for that), so I am nonetheless considerably hazy on learn how to accomplish this. Most tutorials I can discover are Unity tutorials, or contain utilizing an Unproject operate from glu or GLM.
I might hopefully like to know learn how to accomplish this manually as I might like to know what’s occurring. Thanks for any knowledge or steerage.