/// Set Throw Ratio to projector from slider void Tuning::setThrowRatio() { if (!tuning() || signalsBlocked()) return; tuning()->projector().setThrowRatio(getParamAsFloat("Throw Ratio")); setParamAsFloat("FOV", tuning()->projector().fov().degrees()); updateViews(); emit projectorSetupChanged(); }
void Tuning::setFov() { if (!tuning() || isLocked()) return; tuning()->projector().setFov(getParamAsFloat("FOV")); setParamAsFloat("Throw Ratio",tuning()->projector().throwRatio()); updateViews(); emit projectorSetupChanged(); }
void Tuning::setTuning(int _index, omni::Session* _session) { bool _newTuning = (session_ != _session) || (index_ != _index); index_=_index; session_ = _session; if (_newTuning) { glView_->setSession(session_); glView_->setTuningIndex(index_); fullscreen_->setSession(session_); fullscreen_->setTuningIndex(index_); titleBar_->setColor(tuning()->color()); setParamAsFloat("FOV",tuning()->projector().fov().degrees()); setParamAsFloat("Throw Ratio",tuning()->projector().throwRatio()); auto _projSetup = tuning()->projector().setup(); if (_projSetup->getTypeId() == "FreeSetup") { auto* _p = static_cast<omni::proj::FreeSetup*>(_projSetup); setParamAsFloat("Yaw",_p->yaw().degrees()); setParamAsFloat("Pitch",_p->pitch().degrees()); setParamAsFloat("Roll",_p->roll().degrees()); setParamAsFloat("X",_p->pos().x()); setParamAsFloat("Y",_p->pos().y()); setParamAsFloat("Z",_p->pos().z()); } else if (_projSetup->getTypeId() == "PeripheralSetup") { auto* _p = static_cast<omni::proj::PeripheralSetup*>(_projSetup); setParamAsFloat("Yaw",_p->yaw().degrees()); setParamAsFloat("Pitch",_p->pitch().degrees()); setParamAsFloat("Roll",_p->roll().degrees()); setParamAsFloat("Delta Yaw",_p->deltaYaw().degrees()); setParamAsFloat("Distance",_p->distanceCenter()); setParamAsFloat("Tower Height",_p->towerHeight()); setParamAsFloat("Shift",_p->shift()); } sessionModeChange(); updateParameters(); } }