예제 #1
0
void
RefFreeFrame::deInit( )
{
    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
    QCAR::ImageTracker* imageTracker =
            static_cast<QCAR::ImageTracker*> (trackerManager.getTracker(
                    QCAR::Tracker::IMAGE_TRACKER));
    if (imageTracker != 0)
    {
        QCAR::ImageTargetBuilder* targetBuilder =
                imageTracker->getImageTargetBuilder();
        if (targetBuilder && (targetBuilder->getFrameQuality()
                != QCAR::ImageTargetBuilder::FRAME_QUALITY_NONE))
        {
            targetBuilder->stopScan();
        }
    }
}
예제 #2
0
void
RefFreeFrame::render( )
{
    // ** Get the image tracker
    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
    QCAR::ImageTracker* imageTracker =
            static_cast<QCAR::ImageTracker*> (trackerManager.getTracker(
                    QCAR::Tracker::IMAGE_TRACKER));

    // Get the frame quality from the target builder
    QCAR::ImageTargetBuilder* targetBuilder =
            imageTracker->getImageTargetBuilder();
    QCAR::ImageTargetBuilder::FRAME_QUALITY frameQuality =
            targetBuilder->getFrameQuality();

    // Update the UI internal state variables
    updateUIState(targetBuilder, frameQuality);

    if (curStatus == STATUS_SUCCESS)
    {
        curStatus = STATUS_IDLE;

        LOG("Built target, reactivating dataset with new target");
        RefFreeFrameNative::restartTracker();
    }

    // ** Renders the hints
    switch (curStatus)
    {
    case STATUS_SCANNING:
        renderScanningViewfinder(frameQuality);
        break;

    }

    SampleUtils::checkGlError("RefFreeFrame render");
}