Log in or register to post comments

Turning 3d object into a button

July 31, 2012 - 7:10am #1

 

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

September 3, 2012 - 2:39am #8

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

There they say that you need to generate a header file that provides a method signature that you have to use when implementing native functions.
In our case that would be the Dominoes.h that seems to include all my elements that were "not declared in this scope"

Maybe that's the missing puzzle piece to solve our problem ^__^

Plz let me know if you get it working :3

Turning 3d object into a button

September 3, 2012 - 1:05am #7

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

September 2, 2012 - 8:58am #6

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

August 31, 2012 - 5:13am #5

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.
The problem is although I declared and called the touch event in the ImageTargets.java and try to use it now in ImageTargets.cpp
I constantly get compile errors -> various elements in the Java_com_qualcomm_QCARSamples_Dominoes_Dominoes_nativeTouchEvent are not declared in this scope...

Is there something important I might be forgetting?
Sorry for the stupid question ^^; I'm still quite a noob..

Turning 3d object into a button

August 26, 2012 - 3:08pm #4

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

..and how this is declared ( line 816 ) and called ( line 821 ) in Dominoes.java.

Turning 3d object into a button

August 17, 2012 - 6:40am #3

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

July 31, 2012 - 10:22am #2

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.

Log in or register to post comments