performance/Tutorial_NoTimeSlicing.cpp
#include "common/oneworldenv.h"
namespace
{
#define TEST_ENV_CLASS OneWorldEnv
TEST_ENV {}
TUTORIAL
{
KT_LOG_TITLE_BEGIN("TUTORIAL - How to perform a single time-sliced query using the default queue of the world with no TimeSlicing");
CHECK(env.LoadAndAddNavData(
"GeneratedNavData/canyon/canyon_1m_zup.NavData") !=
KY_NULL);
query->BindToDatabase(navWorld->GetDatabase(0));
Kaim::QueryQueue* queryQueue = navWorld->GetAsyncQueryDispatcher()->GetQueue(query, Kaim::AsyncQueryDispatchId_PathFinder);
navWorld->PushAsyncQuery(query, Kaim::AsyncQueryDispatchId_PathFinder);
navWorld->Update();
CHECK(query->IsSafeToReadResult() == true);
}
TUTORIAL
{
KT_LOG_TITLE_BEGIN("TUTORIAL - How to perform a single time-sliced query without using any Queue.");
CHECK(env.LoadAndAddNavData(
"GeneratedNavData/canyon/canyon_1m_zup.NavData") !=
KY_NULL);
query->BindToDatabase(navWorld->GetDatabase(0));
query->PerformQueryBlocking();
CHECK(query->IsSafeToReadResult() == true);
}
}