Hello,
I am not an expert in programming and I have a problem. I installed Vuforia SDK Android 2.8.7. Everything on Eclipse works good and I can create an App for Android using the Vuforia Samples 2.8.8. I am tring to use the Extended Tracking function with a customized 3d model. I read here:
https://developer.vuforia.com/resources/dev-guide/extended-tracking
this:
Native implementation
The following example code shows how to add extended tracking to the “Chips” Image Target within a standard Image Targets application.
The following code for Android and iOS shows a modified loadTracker() function, with the updated lines inbold which iterates through the dataset on startup and calls startExtendedTracking() when it finds the “chips” target. Note that this function can be called at any time; however in this instance, it is implemented within the startup functionality for convenience.
Android implementation
Following is the C++ and JAVA code for initialising this feature on Android.
C++:
123456789101112 | // Find “chips” target in dataset for ( int i = 0; i < myDateSet ->getNumTrackables(); i++) { QCAR::Trackable* trackable = aDataSet.dataSet->getTrackable(i); if ( strcmp (trackable->getName(), "chips" ) == 0) { // Start extended tracking on “chips” target if (!trackable->startExtendedTracking()) { LOGD ( "Failed to start extended tracking on chips target" ); } } |
Java:
1234567891011 | for ( int i = 0 ; i < myDateSet.getNumTrackables(); i++) { Trackable trackable = myDataSet.getTrackable(i); if (trackable.getName().equals( "chips" )) { // Start extended tracking on “chips” target if (!trackable.startExtendedTracking()) { DebugLog.LOGD ( "Failed to start extended tracking on chips target" ); } } |
The fact is that I do not know which part of the existing code I have to modify. Which file is it? What do I have to do?
Sorry if this question looks dummy, but as I said I am a beginner!
Thanks in advance.
Extended Tracking
You need to locate the sample code file where datasets are initialized and loaded.