• Advertisement

Archived

This topic is now archived and is closed to further replies.

3d-vertex to 2d-screencoordinates

This topic is 5955 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i need to convert a 3d-vertex to 2d-screencoordinates. how can i do that ? i thought about doing a special calculation with the vertex and the two matrices (projection and modelview).

Share this post


Link to post
Share on other sites
Advertisement
ScreenX = X/Z
ScreenY = Y/Z
ScreenZ = Z/Z = 1

giving you the (x,y) co-ords. That''s the way I know someone will probably know a better way :p

Share this post


Link to post
Share on other sites
yeah, thats the function i needed !! thx

but if someone has the real mathematical calculation for this,
please tell me !!

Share this post


Link to post
Share on other sites
I''m not sure of the exact mathematical calculation, but I know the vertex goes through the modelview and projection matrices in order to be displayed on a 2D screen

Share this post


Link to post
Share on other sites

  • Advertisement