Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
is there any way to get the current co- ordinates of an image or object on screen? i want to use them for more animation without calculating.
Posted

What "way"? You always have it as the coordinates of a Window and an image relative to a controls are known to you. Moreover, you never need coordinates relative to screen, you always can use coordinate relative to a control containing animation.

So, you have everything… unless you do "animation without calculating". Frankly, is sounds like "OpenGL without programming", "computer without operating systems" and "marriage without a bride".

—SA
 
Share this answer
 
Comments
Sweety Khan 26-Sep-11 5:02am    
hehe right. i thought things can be made more easy.
Hi sweety,

Do you want to select the objects or images in 3d world??
If so you need to implement the ray tracing, You can search it on web.

Using this technique, wherever you click on the screen , a infinite ray (vector)will be fired and the first object the ray will collide will get selected in 3d world. Then you will have to translate the object back to the screen coordinate system from the 3d coordinate system to get the exact object selection.

Hope this might help you!

cheers,
tushar
 
Share this answer
 
Comments
Sweety Khan 26-Sep-11 6:52am    
not now but ths will help me in my 3D project. thanX

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900