Get the 2D location of an 3D object

View previous topic View next topic Go down

Get the 2D location of an 3D object

Post  romrome on Mon Sep 28, 2009 11:13 am

Hi,
I have a chain of points, around 27 of them, i want to make a hittest with 3 different radius. What the way to convert the 3D location to a 2D point on the screen?
If I cannot get the 2d location I'm planning on doing it with raycast, but I'm sure it will cost more performance then a simple Pythagore dist.

Thanks in advance!

-romrome

romrome

Posts : 2
Join date : 2009-09-28

View user profile

Back to top Go down

Re: Get the 2D location of an 3D object

Post  Francescu on Mon Sep 28, 2009 12:39 pm

Check for sio2Project & sio2UnProject, as they are behaving the same way as gluProject and gluUnProject... You can do 2D -> 3D _or_ 3D -> 2D coordinates conversion.

Check Tutorial14 as an example of using sio2Project() to get a point in 3D space converted in 2D space coordinates.

Francescu

Posts : 136
Join date : 2009-03-18

View user profile

Back to top Go down

Re: Get the 2D location of an 3D object

Post  romrome on Mon Sep 28, 2009 12:40 pm

fast reply, i like it!

romrome

Posts : 2
Join date : 2009-09-28

View user profile

Back to top Go down

Re: Get the 2D location of an 3D object

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum