Say I had a model of earth that could be rotated like a virtual globe, but when the user moves the mouse pointer over a specific state or country the border of it becomes highlighted.
Is there a way to figure out what pixel of the texture map the mouse pointer is over?
If that could be determined then I suppose you would need a formula to determine if it fell within the borders of a specific country, then drawing the outline of that country on top of the texture would be another challenge.
Anyone ever try something like this?
EDIT:
I just thought of an easier way, I suppose I could just record the x and y location of the mouse and what the rotation of the globe is and then just keep a table of what countries fall at what x,y coords for that rotation.
I would just have to limit the amount of different rotations the globe can be set at or it could get really time consuming.
Is there a way to figure out what pixel of the texture map the mouse pointer is over?
If that could be determined then I suppose you would need a formula to determine if it fell within the borders of a specific country, then drawing the outline of that country on top of the texture would be another challenge.
Anyone ever try something like this?
EDIT:
I just thought of an easier way, I suppose I could just record the x and y location of the mouse and what the rotation of the globe is and then just keep a table of what countries fall at what x,y coords for that rotation.
I would just have to limit the amount of different rotations the globe can be set at or it could get really time consuming.