Log in or register to post comments

getArea of trackable ??

June 20, 2011 - 12:51pm #1

Hi,
I try to make my active trackable surounded by line :)
I want to use method used in VirtualButton and do smth like this:

const QCAR::Area* vbArea = &trackable->getArea();
assert(vbArea->getType() == QCAR::Area::RECTANGLE);
const QCAR::Rectangle* vbRectangle = static_cast<const QCAR::Rectangle*>(vbArea);

// We add the vertices to a common array in order to have one single 
// draw call. This is more efficient than having multiple glDrawArray calls
vbVertices[vbCounter   ]=0.0f;
vbVertices[vbCounter+ 1]=0.0f;
vbVertices[vbCounter+ 2]=0.0f;
vbVertices[vbCounter+ 3]=1.0f;
vbVertices[vbCounter+ 4]=0.0f;
vbVertices[vbCounter+ 5]=0.0f;
vbVertices[vbCounter+ 6]=1.0f;
vbVertices[vbCounter+ 7]=1.0f;
vbVertices[vbCounter+ 8]=0.0f;

vbVertices[vbCounter+ 9]=vbRectangle->getRightBottomX();
vbVertices[vbCounter+10]=vbRectangle->getRightBottomY();
vbVertices[vbCounter+11]=0.0f;
vbVertices[vbCounter+12]=vbRectangle->getRightBottomX();
vbVertices[vbCounter+13]=vbRectangle->getRightBottomY();
vbVertices[vbCounter+14]=0.0f;
vbVertices[vbCounter+15]=vbRectangle->getLeftTopX();
vbVertices[vbCounter+16]=vbRectangle->getRightBottomY();
vbVertices[vbCounter+17]=0.0f;
vbVertices[vbCounter+18]=vbRectangle->getLeftTopX();
vbVertices[vbCounter+19]=vbRectangle->getRightBottomY();
vbVertices[vbCounter+20]=0.0f;
vbVertices[vbCounter+21]=vbRectangle->getLeftTopX();
vbVertices[vbCounter+22]=vbRectangle->getLeftTopY();
vbVertices[vbCounter+23]=0.0f;
vbCounter+=24;

But :

C:/Development/.../ImageTargets/jni/ImageTargets.cpp:208: error: 'const class QCAR::Trackable' has no member named 'getArea'

any idea ?

Re: getArea of trackable ??

June 21, 2011 - 5:37am #5

Take a look at this thread: http://ar.qualcomm.at/node/2000574

You're probably interested in the ImageTarget::getSize() method.

- Kim

Re: getArea of trackable ??

June 21, 2011 - 3:08am #4
ksiva wrote:

VirtualButtons, on the other hand, do have a getArea() method:

https://ar.qualcomm.com/qdevnet/sites/default/files/docs/qcarsdk/class_q_c_a_r_1_1_virtual_button.html

- Kim

Yes now I'm trying to use it in ImageTargets. I simply want to show user which tracker is active. And I think that border around will be best.

Thx

Re: getArea of trackable ??

June 20, 2011 - 7:05pm #3

VirtualButtons, on the other hand, do have a getArea() method:

https://ar.qualcomm.com/qdevnet/sites/default/files/docs/qcarsdk/class_q_c_a_r_1_1_virtual_button.html

- Kim

Re: getArea of trackable ??

June 20, 2011 - 3:15pm #2

If you look at the API documentation for Trackable, it has no instance variable called getArea

https://ar.qualcomm.com/qdevnet/sites/default/files/docs/qcarsdk/class_q_c_a_r_1_1_trackable.html

Log in or register to post comments