Hi All,
I am an experienced Java developer and since a few weeks I joined a project
which involved real time rendering of 3D objects and interaction with those
objects. I have a problem for which I hope that an experienced 3D programmer
can help me.
Usage:
* I’ve rendered an 3D Sphere object which in this case is a perfect ball (not
eggs shape) using Spherical Texture mapping.
* The idea is that a user can interact with this ball and rotate the ball.
The user clicks a location on the ball and the user is to enter a ‘dot’ on
the ball. Thereafter the user can rotate the ball and place other dots on the
ball.
Problem statement
* When a user clicks the surface of the ball our application is able to get
the mouse position (x, y) in Canvas2D.
Question: How can I convert the mouse position to the Texture position in
order to update the ball surface?
If you are able to help or if you need more information please let me know
because I am really stuck with this.
Martijn Hermanns
Paul Drallos - 06 Aug 2006 04:15 GMT
> Hi All,
>
[quoted text clipped - 22 lines]
>
> Martijn Hermanns
I've never done this, but I'm pretty sure it's possible to set up your
mouse picking so that it returns the nearest vertice of the picked
object. That might get you pretty close (if your sphere is made of
small sections.)
Other than that, you could keep track of the sphere's rotation angles
and then work out the trigonometry for determining the point on the
sphere.