By Aske
on Wed, 03/26/2014 - 14:11
Hey
I'm very new to both Android development and Vuforia.All I want to with Vuforia is to calculate the distance from camera to target and use that to fluently change the amplitude of a given sound.
However this: https://developer.vuforia.com/resources/dev-guide/distance-target doesn't help as I can't figure out where to do this.I'll probably use the Image Target sample for this. As I understand, I should include the code, given in above link, somewhere in the sample file, but where? And how exactly?
Thank you in advance for your help :)
Distance to target for dummies?
Well, first you should decide what exact sample you want to start with;
Distance to target for dummies?
Thank you for your help but I can't find "renderFrame" in the ImageTargetsNative sample's cpp-file (ImageTargets.cpp)
The closets I get in the cpp file is this one line 309:
Distance to target for dummies?
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame
Distance to target for dummies?
Thank you again for your help, however I can't get the native example to compile. I suppose my setup is insufficient, I suspect that I failed with Cygwin.
Distance to target for dummies?
The Java equivalent of sqrt() (and other maths functions) is :
Math.sqrt( x )
and you need to import this package:
Distance to target for dummies?
Ok, thanks :)
I'm still having trouble with implementing the rest of the code, do you have any feedback on that as well?
Distance to target for dummies?
No, we plan to add more tutorials in the future which are Java-centric (as many of the old ones still refer to C++); however, porting from C++ to Java shoud be straigthforward, provided that you have some familiarity with Java programming.
Distance to target for dummies?
Again thank you for your help.
I got it working and here is my "solution", hope that helps whoever might stumble upon this topic and need help:
Distance to target for dummies?
Great, thanks for sharing, this will be helpful to many others.
Distance to target for dummies?
Sorry for double post, can't figure out how to delete the second one.