This is a one minute example showing remote controlled reconstruction.
Boost is only used to generate examples and is not necessary for working with this SDK.
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <conio.h>
BOOST_AUTO_TEST_SUITE(example_reconstructmesdk)
BOOST_AUTO_TEST_CASE(remote_sensor)
{
bool done = false;
bool viewerClosed = false;
bool meshRequested = false;
int frameCounter = 0;
while (!done) {
++frameCounter;
if (frameCounter % 30 == 0) {
}
}
else if (!meshRequested) {
meshRequested = true;
}
int topicIndex = -1;
const char *topicName;
if (topicIndex == -1) {
continue;
}
if (strcmp(topicName, "system/shutdown") == 0)
{
done = true;
}
else if (strcmp(topicName, "engine/volume") == 0)
{
if (viewerClosed && !meshRequested) {
meshRequested = true;
}
}
else if (strcmp(topicName, "engine/mesh") == 0)
{
}
}
}
BOOST_AUTO_TEST_CASE(remote_reconstruction)
{
bool done = false;
while (!done) {
int topicIndex = -1;
const char *topicName = 0;
if (topicIndex == -1) {
continue;
}
if (strcmp(topicName, "system/shutdown") == 0)
{
done = true;
}
else if (strcmp(topicName, "sensor/announce") == 0)
{
const char *sensorName;
printf("Found a sensor: %s\n", sensorName);
}
else if (strcmp(topicName, "engine/requestMesh") == 0)
{
}
else if (strcmp(topicName, "sensor/rgbd") == 0)
{
bool hasAux = false;
if (hasAux) {
}
}
}
}
}
BOOST_AUTO_TEST_SUITE_END()