Topic locked

Function name changes

August 5, 2013 - 9:02am #1

Just though I'd point out to everyone that in your rendering loop on the native side of Vuforia, the API now needs you to do something like this:

QCAR::State state = QCAR::Renderer::getInstance().begin();

for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {
        // Get the trackable:
        const QCAR::TrackableResult* trackableResult = state.getTrackableResult(tIdx);
        QCAR::Matrix44F modelViewMatrix =
                QCAR::Tool::convertPose2GLMatrix(trackableResult->getPose());
        data = modelViewMatrix.data;

        SampleUtils::checkGlError("trackAndRenderVideo");
    }

 

instead of what it was:

 

QCAR::State state = QCAR::Renderer::getInstance().begin();

for(int tIdx = 0; tIdx < state.getNumTrackables(); tIdx++)
    {
        // Get the trackable:
        const QCAR::Trackable* trackable = state.getTrackable(tIdx);
        QCAR::Matrix44F modelViewMatrix =
                QCAR::Tool::convertPose2GLMatrix(trackable->getPose());
        data = modelViewMatrix.data;

        SampleUtils::checkGlError("trackAndRenderVideo");
    }

 

Some of the changes are easy to tell because the Trackable and State classes API have changed, but the getNumTrackables() function is still there for State objects, and looping through them probably isn't what you want. Just a heads up to everyone in case you're having issues upgrading.

Function name changes

March 13, 2014 - 10:55pm #10

thanks for ur information.my problem was solved.

I created  new project and started going it form the begining and added all the frameworks and build it and run... all worked fine.

 

Grigo.

Function name changes

March 13, 2014 - 3:43am #9

I added all the framework needed still I'm getting the error

If you added all the frameworks you would not be getting the error.

Check again - there is a reason for everything.

 

N

Function name changes

March 13, 2014 - 2:57am #8

I added all the framework needed still I'm getting the error

1) "_OBJC_CLASS_$_CMMotionManager", referenced from:

And

2) (null): Linker command failed with exit code 1 (use -v to see invocation)

Function name changes

August 12, 2013 - 7:23am #7

Oh, I thought this was since 2.6. You can tell I didn't update for quite a long time then!

Function name changes

August 12, 2013 - 2:43am #6

Try adding the CoreMotion.framework in Build Phases > Link Library With Binaries

N

Function name changes

August 10, 2013 - 6:54am #5

thks!

this seems to solve the trackable issue. however, there another new error comes up. i have updated to latest libQCAR.a and QCAR folder. My config is xcode 4.6 and Vuforia SDK ios 2.6.8. thank you!

 

 

Undefined symbols for architecture armv7:

  "_OBJC_CLASS_$_CMMotionManager", referenced from:

      objc-class-ref in libQCAR.a(libQCAR.a-armv7-master.o)

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

 

1.  "_OBJC_CLASS_$_CMMotionManager", referenced from:

 

 

objc-class-ref in libQCAR.a(libQCAR.a-armv7-master.o)

symbol(s) not found for architecture armv7

 

2. linker command failed with exit code 1 (use -v to see invocation)

 

 

 

 

Function name changes

August 10, 2013 - 3:32am #4

Make sure to import

#import <QCAR/Trackable.h>
#import <QCAR/TrackableResult.h>
 
and then use this code:
 
const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
const QCAR::Trackable& trackable = result->getTrackable();
QCAR::Matrix44F modelViewMatrix =
    QCAR::Tool::convertPose2GLMatrix(result->getPose());        

 

and:

 if (!strcmp(trackable.getName(), "ar_model"))

Function name changes

August 9, 2013 - 9:29pm #3

thks!

i tried to update the code. however with following error

>>Member access into incomplete type 'const QCAR::TrackableResult'

I was using the NineveGL AR sampe and have upgrade to SDK 2.6.8 IOS. the new dat and xml download from target manager doesnt work in my case

 

 

code

 

// Render video background and retrieve tracking state

QCAR::State state = QCAR::Renderer::getInstance().begin();

QCAR::Renderer::getInstance().drawVideoBackground();

 

for (int i = 0; i < state.getNumTrackableResults(); ++i)

   

{

QCAR::Matrix44F modelViewMatrix =

QCAR::Tool::convertPose2GLMatrix(trackable->getPose());

 

            

  if (!strcmp(trackable->getName(), "ar_model"))

   {

    // Making the meshes visible again.

    _dragon.visible = YES;            

    [_dragon rebaseWithMatrix:qMatrix.data scale:247.0f compatibility:NGLRebaseQualcommAR];  

   }

}

 

anyone 

Function name changes

August 9, 2013 - 12:11am #2

Indeed, you need to use getNumTrackableResults() and getTrackableResult(); this is since SDK 2.0.

 

Topic locked