本文整理汇总了C++中MessageServer::getInvertA方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageServer::getInvertA方法的具体用法?C++ MessageServer::getInvertA怎么用?C++ MessageServer::getInvertA使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageServer
的用法示例。
在下文中一共展示了MessageServer::getInvertA方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (argc==3) sprintf(config.file,"%s",argv[2]);
else {
printUsage();
return 0;
}
} else if( strcmp( argv[1], "-n" ) == 0 ) {
headless = true;
} else if( strcmp( argv[1], "-l" ) == 0 ) {
CameraTool::listDevices();
MidiServer::listDevices();
return 0;
} else if ( (std::string(argv[1]).find("-NSDocumentRevisionsDebugMode")==0 ) || (std::string(argv[1]).find("-psn_")==0) ){
// ignore mac specific arguments
} else {
printUsage();
}
}
#ifndef WIN32
signal(SIGINT,terminate);
signal(SIGHUP,terminate);
signal(SIGQUIT,terminate);
signal(SIGTERM,terminate);
#endif
readSettings(&config);
config.headless = headless;
CameraEngine *camera = setupCamera(config.camera_config);
engine = new SDLinterface(app_name, camera, &config);
if (!headless) {
switch (config.display_mode) {
case 0: engine->setDisplayMode(engine->NO_DISPLAY); break;
case 1: engine->setDisplayMode(engine->SOURCE_DISPLAY); break;
case 2: engine->setDisplayMode(engine->DEST_DISPLAY); break;
}
} else engine->setDisplayMode(engine->NO_DISPLAY);
MessageServer *server = NULL;
FrameProcessor *fiducialfinder = NULL;
FrameProcessor *thresholder = NULL;
FrameProcessor *equalizer = NULL;
FrameProcessor *calibrator = NULL;
if(config.midi) server = new MidiServer(config.midi_config);
else server = new TuioServer(config.host,config.port);
server->setInversion(config.invert_x, config.invert_y, config.invert_a);
equalizer = new FrameEqualizer();
engine->addFrameProcessor(equalizer);
if (config.background) equalizer->toggleFlag(' ');
thresholder = new FrameThresholder(config.gradient_gate, config.tile_size, config.thread_count);
engine->addFrameProcessor(thresholder);
if (config.amoeba) fiducialfinder = new FidtrackFinder(server, config.tree_config, config.grid_config, config.finger_size, config.finger_sensitivity);
else if (config.classic) fiducialfinder = new FidtrackFinderClassic(server, config.grid_config);
engine->addFrameProcessor(fiducialfinder);
calibrator = new CalibrationEngine(config.grid_config);
engine->addFrameProcessor(calibrator);
engine->run();
teardownCamera(camera);
config.display_mode = engine->getDisplayMode();
engine->removeFrameProcessor(calibrator);
delete calibrator;
if (config.amoeba) {
config.finger_size = ((FidtrackFinder*)fiducialfinder)->getFingerSize();
config.finger_sensitivity = ((FidtrackFinder*)fiducialfinder)->getFingerSensitivity();
}
engine->removeFrameProcessor(fiducialfinder);
config.gradient_gate = ((FrameThresholder*)thresholder)->getGradientGate();
config.tile_size = ((FrameThresholder*)thresholder)->getTileSize();
engine->removeFrameProcessor(thresholder);
delete thresholder;
config.background = ((FrameEqualizer*)equalizer)->getState();
engine->removeFrameProcessor(equalizer);
delete equalizer;
config.invert_x = server->getInvertX();
config.invert_y = server->getInvertY();
config.invert_a = server->getInvertA();
delete fiducialfinder;
delete engine;
delete server;
writeSettings(&config);
return 0;
}