本文整理汇总了C++中qcar::TargetFinder::isRequesting方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetFinder::isRequesting方法的具体用法?C++ TargetFinder::isRequesting怎么用?C++ TargetFinder::isRequesting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qcar::TargetFinder
的用法示例。
在下文中一共展示了TargetFinder::isRequesting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: glClear
//.........这里部分代码省略.........
deleteCurrentProductTexture = false;
}
// If the render state indicates that the texture is generated it generates
// the OpenGL texture for start drawing the plane with the book data
if (renderState == RS_TEXTURE_GENERATED)
{
generateProductTextureInOpenGL();
}
// Did we find any trackables this frame?
if (state.getNumTrackableResults() > 0)
{
trackingStarted = true;
// If we are already tracking something we don't need
// to wait any frame before starting the 2D transition
// when the target gets lost
pthread_mutex_lock(&framesToSkipMutex);
framesToSkipBeforeRenderingTransition = 0;
pthread_mutex_unlock(&framesToSkipMutex);
// Gets current trackable result
const QCAR::TrackableResult* trackableResult = state.getTrackableResult(0);
if (trackableResult == NULL)
{
return;
}
modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackableResult->getPose());
// Get the size of the ImageTarget
QCAR::ImageTargetResult *imageResult = (QCAR::ImageTargetResult *)trackableResult;
targetSize = imageResult->getTrackable().getSize();
// Renders the Augmentation View with the 3D Book data Panel
renderAugmentation(trackableResult);
}
else
{
// Manages the 3D to 2D Transition initialization
if (!scanningMode && showAnimation3Dto2D && renderState == RS_NORMAL
&& framesToSkipBeforeRenderingTransition == 0)
{
startTransitionTo2D();
}
// Reduces the number of frames to wait before triggering
// the transition by 1
if( framesToSkipBeforeRenderingTransition > 0 && renderState == RS_NORMAL)
{
pthread_mutex_lock(&framesToSkipMutex);
framesToSkipBeforeRenderingTransition -= 1;
pthread_mutex_unlock(&framesToSkipMutex);
}
}
// Logic for rendering Transition to 2D
if (renderState == RS_TRANSITION_TO_2D && showAnimation3Dto2D)
{
renderTransitionTo2D();
}
// Logic for rendering Transition to 3D
if (renderState == RS_TRANSITION_TO_3D )
{
renderTransitionTo3D();
}
// Get the tracker manager:
QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
// Get the image tracker:
QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(
trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));
// Get the target finder:
QCAR::TargetFinder* finder = imageTracker->getTargetFinder();
// Renders the current state - User process Feedback
if (finder->isRequesting())
{
// Requesting State - Show Requesting text in Status Bar
setStatusBarText("Requesting");
showStatusBar();
}
else
{
// Hiding Status Bar
hideStatusBar();
}
glDisable(GL_DEPTH_TEST);
QCAR::Renderer::getInstance().end();
}