I have a line connecting two points of my model. I see a projection of this line on my screen and a want to map a point of that projection to the corresponding point in my model PoV.
A = (x_a, y_a, z_a, 1.) and
B=(x_b, y_b, z_b, 1.) be the coordinates of two points of my line in the model PoV.
P be the model, view and projection matrices.
A_s = NDC_to_screen(P*V*M*A) and
B_s = NDC_to_screen(P*V*M*B) be the coordinates of
B projections on my screen (assume that those two points are distinct).
vec_AB_s = B_s - A-s be the vector from
B_s and let
C_s = A_s + lambda_s * vec_AB_s be a point that lie on the line's projection on my screen.
How can I get the 3D coordinates of
C so that
C_s = NDC_to_screen(P*V*M*C) ? Something that would be usefull for me would be to have it in the form
C = A + lambda * vec_AB