Content
Shows how to use to tilt moter of a Microsoft Kinect for Windows while scanning.
Boost is only used to generate examples and is not necessary for working with this SDK.
#include <boost/test/unit_test.hpp>
#include <stdio.h>
#include <conio.h>
BOOST_AUTO_TEST_SUITE(example_reconstructmesdk)
BOOST_AUTO_TEST_CASE(scan_tilt)
{
puts("Key mapping");
puts("x: quit scanning");
puts("r: reset volume to empty state");
puts("f: tilt +10 degrees");
puts("b: tilt -10 degrees");
puts("All keys need to be pressed with the command line in the foreground");
bool continue_scanning = true;
int skip_frame_counter = 0;
if (_kbhit()) {
char k = _getch();
switch(k) {
case 'r': {
break;
}
case 'f': {
perform_tilt(c, s, o, 10);
break;
}
case 'b': {
perform_tilt(c, s, o, -10);
skip_frame_counter = 10;
break;
}
case 'x': {
continue_scanning = false;
break;
}
}
}
if (skip_frame_counter == 0) {
}
} else {
skip_frame_counter -= 1;
}
}
}
{
int prev_angle;
int new_angle;
float pos[16];
}
BOOST_AUTO_TEST_SUITE_END()