Sagewire Logo

Convert mouse position to Texture position on ball

2 Message(s) by 2 Author(s) originally posted in 3d java


From: Starter3D Date:   Thursday, July 20, 2006
Hi All,

I am an experienced JAVA developer and since a few weeks I joined a project
which involved real time rendering of 3D object s and interaction with those
objects. I've 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


From: Paul Drallos Date:   Saturday, August 05, 2006
wrote in message:
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've 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



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.



Next Message: Newbie Question


Blogs related to Convert mouse position to Texture position on ball

cd-compare-rate-rk
free game java n70 nokia baby boomer toy summer camp jobs ... free sex position tip common treatment for an abcessed tooth click here gif ... ceiling texture repair fire equipment company free kid games.com final fantasy 7 music video ...

bug-hx
free java game nokia 3510i bible message preparing effects of hair dye french name of flower ... convert mp3 to 3gp musica gratis de mp3 1993 ford escort lx ... baseball field position diagram picture of old money pokemon battle music ...

button-cs
type of texture a ceiling indoor mini golf criminal lawyer mississippi toyota dealership colorado ... convert wav to mp3 free baby looney tune wallpaper hvac tech jobs ... travel nursing position baby chair cosco high candy savers game ...

cabbage-ei
java for pocket pc eminem encore sell toyota highlander body kit ... sex position chair natural cure and remedy international tile stone aldara basal cell carcinoma ... coat house paint texture duffel bag on wheel britney music spear ...

box-cheat-jkc
john steinbeck of mouse and man beth moore on line bible study ... removing ceiling texture vintage barbie doll ford car recall apple cider press teen hair style bangs ... best sex position in bed color poly bag baseball gloves online ...

bed4-dkt
baseball field position numbers boston concert madonna winter horse blanket ... the little mouse the red ripe strawberry and the big hungry bear kona mtn bike ... ceiling stomp texture 6280 download nokia power attic vent ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional