20 Apr 13, 06:33AM
(This post was last modified: 20 Apr 13, 06:37AM by TheNihilanth.)
Well I think I got it.
Let:
w be the point in world space,
M be the model view matrix,
N be the projection matrix,
R be the product of M*N,
v be a 2D point in view space,
w = inverse(R)*v
For the z-depth value I don't know, it could be anything...anyways implementing the above equation would give accurate results in order to get vertex positions of a cube and therefore to know its measures, but there should be another EVEN MORE easy way...
Let:
w be the point in world space,
M be the model view matrix,
N be the projection matrix,
R be the product of M*N,
v be a 2D point in view space,
w = inverse(R)*v
For the z-depth value I don't know, it could be anything...anyways implementing the above equation would give accurate results in order to get vertex positions of a cube and therefore to know its measures, but there should be another EVEN MORE easy way...