bool Config::init() { if( !_animation.isValid( )) _animation.loadAnimation( _initData.getPathFilename( )); // init distributed objects if( !_initData.useColor( )) _frameData.setColorMode( COLOR_WHITE ); _frameData.setRenderMode( _initData.getRenderMode( )); registerObject( &_frameData ); _frameData.setAutoObsolete( getLatency( )); _initData.setFrameDataID( _frameData.getID( )); registerObject( &_initData ); // init config if( !eq::Config::init( _initData.getID( ))) { _deregisterData(); return false; } _loadModels(); _registerModels(); const eq::Canvases& canvases = getCanvases(); if( canvases.empty( )) _currentCanvas = 0; else _currentCanvas = canvases.front(); _setMessage( "Welcome to eqPly\nPress F1 for help" ); return true; }
bool Config::init() { if( !_animation.isValid( )) _animation.loadAnimation( _initData.getPathFilename( )); // init distributed objects if( !_initData.useColor( )) _frameData.setColorMode( COLOR_WHITE ); _frameData.setRenderMode( _initData.getRenderMode( )); registerObject( &_frameData ); _frameData.setAutoObsolete( getLatency( )); _initData.setFrameDataID( _frameData.getID( )); registerObject( &_initData ); // init config if( !eq::Config::init( _initData.getID( ))) { _deregisterData(); return false; } _loadModels(); _registerModels(); // init tracker if( !_initData.getTrackerPort().empty( )) { if( !_tracker.init( _initData.getTrackerPort() )) LBWARN << "Failed to initialize tracker" << std::endl; else { // Set up position of tracking system wrt world space // Note: this depends on the physical installation. eq::Matrix4f m( eq::Matrix4f::IDENTITY ); m.scale( 1.f, 1.f, -1.f ); _tracker.setWorldToEmitter( m ); m = eq::Matrix4f::IDENTITY; m.rotate_z( -M_PI_2 ); _tracker.setSensorToObject( m ); LBINFO << "Tracker initialized" << std::endl; } } const eq::Canvases& canvases = getCanvases(); if( canvases.empty( )) _currentCanvas = 0; else _currentCanvas = canvases.front(); _setMessage( "Welcome to eqPly\nPress F1 for help" ); return true; }