22 #include <boost/program_options.hpp> 45 namespace po = boost::program_options;
48 int main (
int argc,
char** argv) {
49 po::options_description desc(
"Allowed options");
51 (
"help,h",
"produce help message")
54 po::options_description required(
"Required");
55 required.add_options()
56 (
"source-file,s", po::value<string>(),
"source file")
57 (
"target-file,t", po::value<string>(),
"target file")
58 (
"source-object-type,S", po::value<string>(),
"source object type")
59 (
"source-object-id,I", po::value<string>(),
"source object ID")
60 (
"px,x", po::value<double>(),
"Point x")
61 (
"py,y", po::value<double>(),
"Point y")
62 (
"pz,z", po::value<double>(),
"Point z")
63 (
"qw,W", po::value<double>(),
"Quaternion W")
64 (
"qx,X", po::value<double>(),
"Quaternion X")
65 (
"qy,Y", po::value<double>(),
"Quaternion Y")
66 (
"qz,Z", po::value<double>(),
"Quaternion Z")
72 po::store(po::parse_command_line(argc, argv, desc), vm);
75 if (vm.count(
"help") || !vm.count(
"source-file") || !vm.count(
"target-file") || !vm.count(
"source-object-type") || !vm.count(
"source-object-id")
76 || !vm.count(
"px") || !vm.count(
"py") || !vm.count(
"pz") || !vm.count(
"qw") || !vm.count(
"qx") || !vm.count(
"qy") || !vm.count(
"qz")) {
81 string sourceFile = vm[
"source-file"].as<
string>();
82 string targetFile = vm[
"target-file"].as<
string>();
83 string type = vm[
"source-object-type"].as<
string>();
84 string id = vm[
"source-object-id"].as<
string>();
85 double px = vm[
"px"].as<
double>();
86 double py = vm[
"py"].as<
double>();
87 double pz = vm[
"pz"].as<
double>();
88 double qw = vm[
"qw"].as<
double>();
89 double qx = vm[
"qx"].as<
double>();
90 double qy = vm[
"qy"].as<
double>();
91 double qz = vm[
"qz"].as<
double>();
95 objects_transformer.
transformRecordedObjects(sourceFile, targetFile, type,
id, px, py, pz, qw, qx, qy, qz);
this namespace contains all generally usable classes.