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 ?
Take a look at this thread: http://ar.qualcomm.at/node/2000574
You're probably interested in the ImageTarget::getSize() method.
- Kim