-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surround mode: Make vertical field of view adjustable
Based on ideas by Github user ArsenicBismuth in Github pull request #36. Adjust VFOV with the mouse wheel to zoom in and out, and reset the view with 'Z'. This also fixes the bug that the aspect ratio for surround mode depended on the view port; it should always be 2:1.
- Loading branch information
Showing
7 changed files
with
88 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* This file is part of Bino, a 3D video player. | ||
* | ||
* Copyright (C) 2022 | ||
* Copyright (C) 2022, 2023, 2024 | ||
* Martin Lambers <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
@@ -39,6 +39,8 @@ Q_OBJECT | |
bool _openGLStereo; // is this widget in quad-buffered stereo mode? | ||
int _alternatingLastView; // last view displayed in Mode_Alternating (0 or 1) | ||
|
||
float _surroundVerticalFOVDefault; | ||
float _surroundVerticalFOV; | ||
bool _inSurroundMovement; | ||
QPointF _surroundMovementStart; | ||
float _surroundHorizontalAngleBase; | ||
|
@@ -55,11 +57,13 @@ Q_OBJECT | |
void rebuildDisplayPrgIfNecessary(OutputMode outputMode); | ||
|
||
public: | ||
Widget(OutputMode outputMode, QWidget* parent = nullptr); | ||
Widget(OutputMode outputMode, float surroundVerticalFOV, QWidget* parent = nullptr); | ||
|
||
bool isOpenGLStereo() const; | ||
OutputMode outputMode() const; | ||
void setOutputMode(OutputMode mode); | ||
void setSurroundVerticalFieldOfView(float vfov); | ||
void resetSurroundView(); | ||
|
||
virtual QSize sizeHint() const override; | ||
virtual void initializeGL() override; | ||
|
@@ -70,6 +74,7 @@ Q_OBJECT | |
virtual void mousePressEvent(QMouseEvent* e) override; | ||
virtual void mouseReleaseEvent(QMouseEvent* e) override; | ||
virtual void mouseMoveEvent(QMouseEvent* e) override; | ||
virtual void wheelEvent(QWheelEvent* e) override; | ||
|
||
public slots: | ||
void mediaChanged(PlaylistEntry entry); | ||
|