Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


3d-vertex to 2d-screencoordinates


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 IStrikerI   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 September 2001 - 05:46 AM

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).

Sponsor:

#2 Crazy_Vasey   Members   -  Reputation: 100

Like
Likes
Like

Posted 29 September 2001 - 06:58 AM

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

#3 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 29 September 2001 - 07:27 AM

You can use gluProject and gluUnProject to convert back and forth. If you''re trying to draw a 2D object you can use an orthographic projection matrix.

[Resist Windows XP''s Invasive Production Activation Technology!]

#4 IStrikerI   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 September 2001 - 09:22 AM

yeah, thats the function i needed !! thx

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

#5 masonium   Members   -  Reputation: 118

Like
Likes
Like

Posted 01 October 2001 - 03:36 PM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS