Velocity fade dependent setting removal (#282)

* removed velocity fade dependent fade.

* changed floating point comparisons

* explicit conversion changes

* removed head speed calculation from overlaycontroller as no longer used
This commit is contained in:
ykeara
2019-09-01 02:13:38 -05:00
committed by GitHub
parent 0d64cc4438
commit 5452144157
4 changed files with 32 additions and 272 deletions
+2 -28
View File
@@ -6,6 +6,7 @@
#include <chrono>
#include <thread>
#include <openvr.h>
#include <cmath>
class QQuickWindow;
// application namespace
@@ -60,8 +61,6 @@ struct ChaperoneProfile
float chaperoneAlarmSoundDistance = 0.0f;
bool enableChaperoneShowDashboard = false;
float chaperoneShowDashboardDistance = 0.0f;
bool enableChaperoneVelocityModifier = false;
float chaperoneVelocityModifier = 0.0f;
};
class ChaperoneTabController : public QObject
@@ -125,20 +124,11 @@ class ChaperoneTabController : public QObject
WRITE setChaperoneShowDashboardDistance NOTIFY
chaperoneShowDashboardDistanceChanged )
Q_PROPERTY( bool chaperoneVelocityModifierEnabled READ
isChaperoneVelocityModifierEnabled WRITE
setChaperoneVelocityModifierEnabled NOTIFY
chaperoneVelocityModifierEnabledChanged )
Q_PROPERTY( float chaperoneVelocityModifier READ chaperoneVelocityModifier
WRITE setChaperoneVelocityModifier NOTIFY
chaperoneVelocityModifierChanged )
private:
OverlayController* parent;
float m_visibility = 0.6f;
float m_fadeDistance = 0.7f;
float m_fadeDistanceModified = 0.7f;
float m_height = 2.0f;
bool m_centerMarker = false;
bool m_playSpaceMarker = false;
@@ -166,10 +156,6 @@ private:
float m_chaperoneShowDashboardDistance = 0.5f;
bool m_chaperoneShowDashboardActive = false;
bool m_enableChaperoneVelocityModifier = false;
float m_chaperoneVelocityModifier = 0.0f;
float m_chaperoneVelocityModifierCurrent = 1.0f;
unsigned settingsUpdateCounter = 0;
bool m_isHapticGood = true;
@@ -194,10 +180,7 @@ public:
void initStage1();
void initStage2( OverlayController* parent );
void eventLoopTick( vr::TrackedDevicePose_t* devicePoses,
float leftSpeed,
float rightSpeed,
float hmdSpeed );
void eventLoopTick( vr::TrackedDevicePose_t* devicePoses );
void handleChaperoneWarnings( float distance );
float boundsVisibility() const;
@@ -229,9 +212,6 @@ public:
bool isChaperoneShowDashboardEnabled() const;
float chaperoneShowDashboardDistance() const;
bool isChaperoneVelocityModifierEnabled() const;
float chaperoneVelocityModifier() const;
void reloadChaperoneProfiles();
void saveChaperoneProfiles();
@@ -269,9 +249,6 @@ public slots:
void setChaperoneShowDashboardEnabled( bool value, bool notify = true );
void setChaperoneShowDashboardDistance( float value, bool notify = true );
void setChaperoneVelocityModifierEnabled( bool value, bool notify = true );
void setChaperoneVelocityModifier( float value, bool notify = true );
void flipOrientation( double degrees = 180 );
void reloadFromDisk();
@@ -316,9 +293,6 @@ signals:
void chaperoneShowDashboardEnabledChanged( bool value );
void chaperoneShowDashboardDistanceChanged( float value );
void chaperoneVelocityModifierEnabledChanged( bool value );
void chaperoneVelocityModifierChanged( float value );
void chaperoneProfilesUpdated();
};