Log in or register to post comments

Sample projects examples

September 26, 2012 - 12:34pm #1

How were the sample projects created, specifically the Frame Markers sample? So far I have only used Unity with the iOS plugin to create projects. If I was to use one of the samples for a basis to build an app how would I replace the objects (like the Q,C,A, and R) with my own models sized and positioned as I want them? I've gone through the Trackables section of the Dev Guide and I think I know how to replace the markers but how do I create the relationship between markers and models without making a Unity iOS build of a Unity scene?

Sample projects examples

October 2, 2012 - 2:47am #6

Hi,

Vuforia only works with devices iPhone 3GS and upwards.

N

Sample projects examples

October 2, 2012 - 12:05am #5

Hello all,

I am new to vuforia sdk.I had gone through this link :-https://ar.qualcomm.at/qdevnet/

And followed the steps 

1)Downloding & intaling the sdk

2)when i exectue the sample name ImageTarget into my device(iphone 3G with ios4.1).

 

The applicaiton get istalled and on tapping the splashscreen the actionshet appears.But then it get crased.I dont know y but all the sample aplicaiton gett crased.And it does not show any crash issue even though i debug the code.The crash take me to main.m file.

 

And some time it get error of :-Failed to load tracking data set because the ImageTracker has not been initialized.  

In this funtion.

- (QCAR::DataSet *)loadDataSet:(NSString *)dataSetPath

{

    QCAR::DataSet *theDataSet = nil;

        

    const char* msg;

    const char* msgNotInit = "Failed to load tracking data set because the ImageTracker has not been initialized.";

    const char* msgFailedToCreate = "Failed to create a new tracking data.";

    const char* msgFailedToLoad = "Failed to load data set.";

    

    // Get the image tracker:

    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();

    QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));

    

    if (imageTracker == NULL)

    {

        msg = msgNotInit;

        errorCode = QCAR_ERRCODE_INIT_TRACKER;

    }

    else

    {

        // Create the data sets:

        theDataSet = imageTracker->createDataSet();

        if (theDataSet == nil)

        {

            msg = msgFailedToCreate;

            errorCode = QCAR_ERRCODE_CREATE_DATASET;            

        }

        else

        {

            // Load the data set from the App Bundle

            // If the DataSet were in the Documents folder we'd use STORAGE_ABSOLUTE and the full path

            if (!theDataSet->load([dataSetPath cStringUsingEncoding:NSASCIIStringEncoding], QCAR::DataSet::STORAGE_APPRESOURCE))

            {

                msg = msgFailedToLoad;

                errorCode = QCAR_ERRCODE_LOAD_DATASET;            

                imageTracker->destroyDataSet(theDataSet);

                theDataSet = nil;

            }

            else

            {

                NSLog(@"Successfully loaded data set.");

            }

        }

    }

    

    if (theDataSet == nil)

    {

        NSString* nsMsg = [NSString stringWithUTF8String:msg];

        UIAlertView* alert = [[UIAlertView alloc] initWithTitle:DatasetErrorTitle message:nsMsg delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

        NSLog(@"%@", nsMsg);

        [alert show];

        [alert release];

    }

    

    return theDataSet;

}

 

 

Please help me. 

Sample projects examples

September 27, 2012 - 7:02am #4

Hi dshriver

The Unity and native SDKs are very different, although they are both built on a common core.

In Unity Vuforia is a fully fledged plug-in that integrated with the Unity build tool chain and pipeline.  As a result you cannot see any .h files for augmentations because everything is done in Unity, and to be honest it is much easier.  The Augmentations are simply 3D objects that are attached as children to say an ImageTarget.

When Unity generates an XCode project it contains startup code that helps to initialise Vuforia, plus it does contain various Vuforia libraries to link and build.

HTH

N

 

Sample projects examples

September 27, 2012 - 6:25am #3

Thanks for the reply David. I've created a couple of projects with Unity using the parent-child method and then doing an iOS build of the scene. What I am wondering about is the method used in the sample projects you provide. In those projects the augmentations seem to be header files (A_object.h, B_object.h, teapot.h) and there are no libraries like libQCARUnityPlayer.a, so I'm wondering how these projects were made.

Sample projects examples

September 26, 2012 - 7:21pm #2

Always make the model, or other augmentation, a child of the target - you simply drag it onto the target instance in the hierarchy. This will cause it to be recognized by the trackable event handler. Its position relative to its parent target will determine its position in the AR scene when the target is viewed.

Is this what you're asking?

 

Log in or register to post comments