Transform Real world coordinates to screen coordinates

Started by burak_kara, April 20, 2012, 12:13:09 PM

Previous topic - Next topic

burak_kara

In my app I try to put n objects on to the screen.
They need to be placed according to their latitude, longtitude etc. And when ı move my telephone around(not touching)
ı should be seeing them flawing around, according to their coordinates.
There are two questions.
Is there a method that takes lat, long and convert them to screen coordinates?
And how can ı set the place of object to a coordinate and when ı move the camera to left, object should dissaapear.
When ı turn right it should come again.

I feel like couldnt explained myself, but if you know metaio AR framework ı am trying to create its functionality, its third tutorial GPSLocationBasedActivity.
I hope you try what ı tried to mean.

Thanks in advancé!

EgonOlsen

You seem to have only a vague idea of 3d spaces. I suggest to play around a little with some simple example to get a feeling for world space, object space, camera space and screen space. Then you can make the next step to map your gps coordinates into that world.

There's no magic method that does this job for you especially not when talking about SCREEN coordinates. In 3D graphics, you are working in a 3D world. The screen is 2D. How the 3D world is being projected onto the 2D screen depends on the transformation from camera space into screen space but you won't find a method that takes gps coordinates and maps them into 2D screen coordinates. That wouldn't make any sense at all. You have to create your own 3D world, place the objects into it based on your gps coordinates and adjust the projection so that the result matches the camera's view...