FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Create a sphere and detect touch event on the sphere

4 posters

Go down

Create a sphere and detect touch event on the sphere Empty Create a sphere and detect touch event on the sphere

Post  taxi4alex Wed Jun 10, 2009 5:08 am

Hello,

I am looking for a way to create a sphere which simulate the earth with continents. This sphere can spin around axle and detect touch event on each "continent" (the continent will be highlighted with a different color).

Is it possible to implement this idea with SIO2 and Blender? Could anybody please help to give me a suggestion?

Thanks,

Alex

taxi4alex

Posts : 5
Join date : 2009-06-10

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  sio2interactive Wed Jun 10, 2009 5:18 pm

What I would do is model the earth etc... in blender and would implement and arc ball movement within the application.

Google on OpenGL arc ball you'll easily find some sample code.
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  taxi4alex Wed Jun 10, 2009 7:48 pm

Thanks sio2interactive for your kindly help Smile

BR,
Alex

taxi4alex

Posts : 5
Join date : 2009-06-10

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  1sidetracked Sat Jun 20, 2009 8:56 am

You should unmap the window coordinates (touch point) to object coordinates using inverse modelview and projection matrices.
After this you can look where these object coordinates lie on your sphere.

1sidetracked

Posts : 3
Join date : 2009-06-20

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  sio2interactive Sat Jun 20, 2009 5:10 pm

This is why sio2 contain sio2Project and sio2Unproject Wink

However they are quite heavy calculations, use it with care!
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  Francescu Sat Jun 20, 2009 5:16 pm

tutorial14 uses sio2Project and if you search (advanced search) in the forums, you will see examples of sio2UnProject used in Ray tracing logic...just FYI

Francescu

Posts : 136
Join date : 2009-03-18

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  1sidetracked Mon Jun 22, 2009 8:26 pm

I'm new to SIO2, so i was not aware of these functions.
I just know that OpenGL ES 1.X does not support them.
And yes, these are quite expensive. Even on desktop OpenGL.

some crawling Wink :
Everyday I'm learning more about your engine and everyday I'm more impressed of your work.

1sidetracked

Posts : 3
Join date : 2009-06-20

Back to top Go down

Create a sphere and detect touch event on the sphere Empty Re: Create a sphere and detect touch event on the sphere

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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