"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Iterate through active dataset

Have pity on a poor iOS developer who's a little confused by some of the Qualcomm code (We don't deal often with things like the :: scope resolution operator for example). I need to prepare some objects to correspond with every trackable object in the active dataset. I would like to iterate through the active dataset using the trackable name as a key, and create an NSDictionary of my own objects that have various properties I need (the model I'm using for each target and other data). What's a good strategy to create a 30-60 item NSDictionary of my custom objects anytime I load a new data set? I see things like QCAR::ImageTracker::getActiveDataSet, in the API, but I'm a bit vexed by scope and syntax issues with trying to figure out how to use this and some of the other QCAR methods. Thanks in advance.

dylanmalone

Thu, 06/07/2012 - 17:38

Thanks NalinS, I've read through the guide, made some sample apps with the Vuforia libraries, and gotten familiar with the general architecture.

Once you have a dataset you can iterate through it using getNumTrackables() to get the number of trackables, and getTrackable(i) to get the QCAR trackable itself. In QCARUtils.mm there is a function called findImageTarget() that shows how to do this. Hopefully this should make things clearer.