Miscellaneous changes (#3708)

* Add fov input for fisheye projections in launcher
* Updated gitignore to ignore more necessary files
* Fixed typos
* Replace `add_definitions` with `add_compile_options` in CMakeLists for /MP /bigobj, which are not preprocessor defs
* Fixes in TuioEar: add `override`; replace erroneous `unique_lock` with `lock_guard`; minor refactor

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Mathis Brossier
2025-06-14 16:12:44 +02:00
committed by GitHub
parent 430a93ddda
commit 28929da822
10 changed files with 66 additions and 47 deletions

View File

@@ -130,7 +130,7 @@ public:
* combobox index
* \tilt The tilt of the fisheye in degrees
*/
void setProjectionFisheye(int quality, float tilt);
void setProjectionFisheye(int quality, float tilt, float fov);
/**
* Sets the window's projection type to spherical mirror, with the accompanying
@@ -235,6 +235,7 @@ private:
QWidget* widget = nullptr;
QComboBox* quality = nullptr;
QDoubleSpinBox* tilt = nullptr;
QDoubleSpinBox* fov = nullptr;
} _fisheye;
struct {

View File

@@ -194,7 +194,11 @@ void DisplayWindowUnion::initialize(const std::vector<QRect>& monitorSizeList,
},
[&](const sgct::config::FisheyeProjection& p) {
if (p.quality.has_value()) {
wCtrl->setProjectionFisheye(*p.quality, p.tilt.value_or(0.f));
wCtrl->setProjectionFisheye(
*p.quality,
p.tilt.value_or(0.f),
p.fov.value_or(180.0)
);
}
},
[&](const sgct::config::PlanarProjection& p) {

View File

@@ -498,6 +498,7 @@ QWidget* WindowControl::createFisheyeWidget() {
// | { Informational text } | Row 0
// | Quality * [DDDDD>] | Row 1
// | Tilt * [oooooo] | Row 2
// | FOV * [oooooo] | Row 3
// *------------*-----------*
QWidget* widget = new QWidget;
@@ -540,6 +541,18 @@ QWidget* WindowControl::createFisheyeWidget() {
_fisheye.tilt->setMaximum(180.0);
layout->addWidget(_fisheye.tilt, 2, 1);
QLabel* labelFov = new QLabel("FOV");
const QString fovTip = "Set the fisheye/dome field-of-view angle used in the fisheye "
"renderer.";
labelFov->setToolTip(fovTip);
layout->addWidget(labelFov, 3, 0);
_fisheye.fov = new QDoubleSpinBox;
_fisheye.fov->setToolTip(fovTip);
_fisheye.fov->setMinimum(0.0);
_fisheye.fov->setMaximum(360.0);
layout->addWidget(_fisheye.fov, 3, 1);
return widget;
}
@@ -743,6 +756,7 @@ void WindowControl::resetToDefaults() {
_cylindrical.heightOffset->setValue(DefaultHeightOffset);
_fisheye.quality->setCurrentIndex(2);
_fisheye.tilt->setValue(0.0);
_fisheye.fov->setValue(180.0);
_sphericalMirror.quality->setCurrentIndex(2);
_cylindrical.quality->setCurrentIndex(2);
_equirectangular.quality->setCurrentIndex(2);
@@ -823,9 +837,9 @@ void WindowControl::generateWindowInformation(sgct::config::Window& window) cons
switch (static_cast<ProjectionIndices>(_projectionType->currentIndex())) {
case ProjectionIndices::Fisheye:
vp.projection = sgct::config::FisheyeProjection {
.fov = 180.f,
.fov = static_cast<float>(_fisheye.fov->value()),
.quality = Quality[_fisheye.quality->currentIndex()].first,
.tilt = static_cast<float>(_fisheye.tilt->value())
.tilt = static_cast<float>(_fisheye.tilt->value()),
};
break;
case ProjectionIndices::SphericalMirror:
@@ -881,9 +895,10 @@ void WindowControl::setProjectionPlanar(float hfov, float vfov) {
_projectionType->setCurrentIndex(static_cast<int>(ProjectionIndices::Planar));
}
void WindowControl::setProjectionFisheye(int quality, float tilt) {
void WindowControl::setProjectionFisheye(int quality, float tilt, float fov) {
_fisheye.quality->setCurrentIndex(indexForQuality(quality));
_fisheye.tilt->setValue(tilt);
_fisheye.fov->setValue(fov);
_projectionType->setCurrentIndex(static_cast<int>(ProjectionIndices::Fisheye));
}