By Taylrl
on Tue, 07/31/2012 - 14:10
Hi,
I have managed to get ImageTargets to compile and have also managed to change the teapot into my own object. Next, I would like to be able to click on my object and it then perform an action. Can anyone who has manged to do this give me some pointers or might they be able to point me in the right direction? Your help with this is most appreciated!!
Thanks! :-)
Turning 3d object into a button
Check out the Dominoes sample for Android. This demonstrates how to project touches on the screen onto the target, which will enable you to determine if a touch intersects with an object.
Turning 3d object into a button
Thanks!
I am looking around the Dominoes sample and I think I need to find something called EAGLview.mm. I can't seem to find it anywhere. Do you know where it is located?
Taylrl
Turning 3d object into a button
Are you using the Android SDK or iOS - EAGLview.mm is for iOS.
For Android, take a look at the native touch event in Dominoes.cpp, line 143.
Java_com_qualcomm_QCARSamples_Dominoes_Dominoes_nativeTouchEvent
Turning 3d object into a button
Thanks, that already helped me alot although I am having a problem here ^^;
I'm trying to integrate the native touch events into Image Targets because that's exactly what I need.
Turning 3d object into a button
This has helped me a lot also. I think I am at the same stage as you actually Balvana. I am just trying to work it out at the moment. In the meantime if anyone has any pointers then they would be most appreciated.
Thanks again for all the help you have provided! :-)
Turning 3d object into a button
Hey,
If someone manages to get an event when he clicks on the AR in ImageTargets sample, it would be cool to share idea/code.
Thanks in advance.
Gabriel
Turning 3d object into a button
Unfortunately I'm still working on a solution but I've found a quite interesting article on how to deal with native methods.
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html