Center Marker/ Chaperone Refactor/ IVROverlay/IVRSettings wrappers PT 1/? (#438)
* changed click noises to internal sounds * udpated to ovr 1.11.11 * in prog added prototypes * began wrapper for IVRSettings * added getters for chaperone colors * added setters for chaperone color * fixed type conversion issue * fixed linking issue, added additional settings chaperone page * adjusted chaperone page qml * added color chaperone UI * refactor in prog * updated ivrsettings wrapper, refactor in prog * refactor in prog * collision bound style add * refactor * cleaned up error logging * fixed fade distance remember bug * fixed sounds * fixed brightness opacity bug setting to 0 when 0 * fixed sounds * added wrapper for removing keys * refactored reset * added chaperone Styles to UI * added chaperone floor always on * fixed copy/paste error * adjsuted ui chaperone color slider * started adding chaperone floor marker * fixeed naming error overlay * finalized chaperone Ideas, added chaperone markers * began ivroverlay wrapper * center marker fully implemented * added function prototypes for new settings * added setting, and updated ui for New Center Marker Overlay * adjsuted sound effect volume and formatting for chaperonecolorbox * adjusted volume back * fixed various issues aroudn new overlay * removed artifact comment * cleaned up settings wrapper * cleaned up chaperone tab controller for namespace changes * removed ide comment issue * cleanup overlay wrapper * cleaned up tab/space changed file name * renamed files * fixed include statements * updated namespace in chaperonetabcontroller * fixed tab/space issues * re-activated boundbasisheight * fixed bulgarian case * changed chaperone warnings to only work in roomscale * fix capitilization * fixed tracking universe update * direct text input change for brightness * qml fixes * fixed qml format issues * fixed sound issue w/ sliders * fixed super truely * Add SDL libraries to CircleCI * Remove -tidy from circleCI config * flushed out error messages in overlaywrapper * removed hungarian notation * added get/set string to ovrsettings wrapper * misc cleanup * add reset orientation btn and new center marker to chaperone * ui adjustments * changed alarm audio * adjusted sound effect volume slightly lower * updated for 5.1.0 release Co-authored-by: Vasily <vautkin@teknik.io>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -11,9 +11,13 @@
|
||||
#include "../utils/ChaperoneUtils.h"
|
||||
#include "../settings/settings_object.h"
|
||||
#include "MoveCenterTabController.h"
|
||||
#include "../openvr/ovr_overlay_wrapper.h"
|
||||
#include "../openvr/ovr_settings_wrapper.h"
|
||||
#include <utility>
|
||||
|
||||
class QQuickWindow;
|
||||
// application namespace
|
||||
|
||||
namespace advsettings
|
||||
{
|
||||
// forward declaration
|
||||
@@ -65,6 +69,7 @@ struct ChaperoneProfile : settings::ISettingsObject
|
||||
float chaperoneAlarmSoundDistance = 0.0f;
|
||||
bool enableChaperoneShowDashboard = false;
|
||||
float chaperoneShowDashboardDistance = 0.0f;
|
||||
bool centerMarkerNew = false;
|
||||
|
||||
virtual settings::SettingsObjectData saveSettings() const override
|
||||
{
|
||||
@@ -139,6 +144,7 @@ struct ChaperoneProfile : settings::ISettingsObject
|
||||
o.addValue( static_cast<double>( chaperoneAlarmSoundDistance ) );
|
||||
o.addValue( enableChaperoneShowDashboard );
|
||||
o.addValue( static_cast<double>( chaperoneShowDashboardDistance ) );
|
||||
o.addValue( centerMarkerNew );
|
||||
|
||||
return o;
|
||||
}
|
||||
@@ -230,6 +236,7 @@ struct ChaperoneProfile : settings::ISettingsObject
|
||||
enableChaperoneShowDashboard = obj.getNextValueOrDefault( false );
|
||||
chaperoneShowDashboardDistance
|
||||
= static_cast<float>( obj.getNextValueOrDefault( 0.0 ) );
|
||||
centerMarkerNew = obj.getNextValueOrDefault( false );
|
||||
}
|
||||
|
||||
virtual std::string settingsName() const override
|
||||
@@ -298,7 +305,20 @@ class ChaperoneTabController : public QObject
|
||||
float chaperoneShowDashboardDistance READ chaperoneShowDashboardDistance
|
||||
WRITE setChaperoneShowDashboardDistance NOTIFY
|
||||
chaperoneShowDashboardDistanceChanged )
|
||||
|
||||
Q_PROPERTY( int chaperoneColorR READ chaperoneColorR WRITE
|
||||
setChaperoneColorR NOTIFY chaperoneColorRChanged )
|
||||
Q_PROPERTY( int chaperoneColorG READ chaperoneColorG WRITE
|
||||
setChaperoneColorG NOTIFY chaperoneColorGChanged )
|
||||
Q_PROPERTY( int chaperoneColorB READ chaperoneColorB WRITE
|
||||
setChaperoneColorB NOTIFY chaperoneColorBChanged )
|
||||
Q_PROPERTY( int chaperoneColorA READ chaperoneColorA WRITE
|
||||
setChaperoneColorA NOTIFY chaperoneColorAChanged )
|
||||
Q_PROPERTY( int collisionBoundStyle READ collisionBoundStyle WRITE
|
||||
setCollisionBoundStyle NOTIFY collisionBoundStyleChanged )
|
||||
Q_PROPERTY( bool chaperoneFloorToggle READ chaperoneFloorToggle WRITE
|
||||
setChaperoneFloorToggle NOTIFY chaperoneFloorToggleChanged )
|
||||
Q_PROPERTY( bool centerMarkerNew READ centerMarkerNew WRITE
|
||||
setCenterMarkerNew NOTIFY centerMarkerNewChanged )
|
||||
private:
|
||||
OverlayController* parent;
|
||||
|
||||
@@ -329,6 +349,14 @@ private:
|
||||
bool m_leftHapticClickActivated = false;
|
||||
bool m_rightHapticClickActivated = false;
|
||||
|
||||
int m_chaperoneColorR = 0;
|
||||
int m_chaperoneColorG = 255;
|
||||
int m_chaperoneColorB = 255;
|
||||
|
||||
int m_collisionBoundStyle = 0;
|
||||
|
||||
bool m_chaperoneFloorToggle = false;
|
||||
|
||||
bool m_autosaveComplete = false;
|
||||
|
||||
int m_updateTicksChaperoneReload = 0;
|
||||
@@ -340,25 +368,53 @@ private:
|
||||
vr::VRInputValueHandle_t m_leftInputHandle;
|
||||
vr::VRInputValueHandle_t m_rightInputHandle;
|
||||
|
||||
vr::VROverlayHandle_t m_chaperoneFloorOverlayHandle
|
||||
= vr::k_ulOverlayHandleInvalid;
|
||||
|
||||
std::vector<ChaperoneProfile> chaperoneProfiles;
|
||||
|
||||
std::string m_floorMarkerFN = "/res/img/chaperone/centermark.png";
|
||||
void initFloorOverlay();
|
||||
void updateOverlay();
|
||||
void updateOverlayColor();
|
||||
void checkOverlayRotation();
|
||||
int m_rotationUpdateCounter = 0;
|
||||
int m_rotationCurrent = 0;
|
||||
bool m_overlayNeedsUpdate = false;
|
||||
|
||||
vr::ETrackingUniverseOrigin m_trackingUniverse
|
||||
= vr::TrackingUniverseRawAndUncalibrated;
|
||||
|
||||
public:
|
||||
~ChaperoneTabController();
|
||||
|
||||
void initStage1();
|
||||
void initStage2( OverlayController* parent );
|
||||
|
||||
void eventLoopTick( vr::TrackedDevicePose_t* devicePoses );
|
||||
void eventLoopTick( vr::ETrackingUniverseOrigin universe,
|
||||
vr::TrackedDevicePose_t* devicePoses );
|
||||
void dashboardLoopTick();
|
||||
void handleChaperoneWarnings( float distance );
|
||||
|
||||
float boundsVisibility() const;
|
||||
float fadeDistance() const;
|
||||
float height() const;
|
||||
bool centerMarker() const;
|
||||
bool playSpaceMarker() const;
|
||||
float fadeDistance();
|
||||
float height();
|
||||
bool centerMarker();
|
||||
bool playSpaceMarker();
|
||||
bool forceBounds() const;
|
||||
bool disableChaperone() const;
|
||||
|
||||
int chaperoneColorR();
|
||||
int chaperoneColorG();
|
||||
int chaperoneColorB();
|
||||
int chaperoneColorA() const;
|
||||
|
||||
bool centerMarkerNew();
|
||||
|
||||
bool chaperoneFloorToggle();
|
||||
|
||||
int collisionBoundStyle();
|
||||
|
||||
void setRightHapticActionHandle( vr::VRActionHandle_t handle );
|
||||
void setLeftHapticActionHandle( vr::VRActionHandle_t handle );
|
||||
void setRightInputHandle( vr::VRInputValueHandle_t handle );
|
||||
@@ -419,6 +475,18 @@ public slots:
|
||||
void setChaperoneShowDashboardEnabled( bool value, bool notify = true );
|
||||
void setChaperoneShowDashboardDistance( float value, bool notify = true );
|
||||
|
||||
void setChaperoneColorR( int value, bool notify = true );
|
||||
void setChaperoneColorG( int value, bool notify = true );
|
||||
void setChaperoneColorB( int value, bool notify = true );
|
||||
void setChaperoneColorA( int value, bool notify = true );
|
||||
|
||||
void setCenterMarkerNew( bool value, bool notify = true );
|
||||
|
||||
void setCollisionBoundStyle( int value,
|
||||
bool notify = true,
|
||||
bool isTemp = false );
|
||||
void setChaperoneFloorToggle( bool value, bool notify = true );
|
||||
|
||||
void flipOrientation( double degrees = 180 );
|
||||
void reloadFromDisk();
|
||||
|
||||
@@ -464,6 +532,16 @@ signals:
|
||||
void chaperoneShowDashboardEnabledChanged( bool value );
|
||||
void chaperoneShowDashboardDistanceChanged( float value );
|
||||
|
||||
void chaperoneColorRChanged( int value );
|
||||
void chaperoneColorGChanged( int value );
|
||||
void chaperoneColorBChanged( int value );
|
||||
void chaperoneColorAChanged( int value );
|
||||
|
||||
void collisionBoundStyleChanged( int value );
|
||||
|
||||
void chaperoneFloorToggleChanged( bool value );
|
||||
void centerMarkerNewChanged( bool value );
|
||||
|
||||
void chaperoneProfilesUpdated();
|
||||
};
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ void VideoTabController::setBrightnessOpacityValue( float percvalue,
|
||||
settings::setSetting( settings::DoubleSetting::VIDEO_brightnessOpacityValue,
|
||||
static_cast<double>( percvalue ) );
|
||||
|
||||
if ( realvalue >= 0.97f || realvalue <= 0.00f )
|
||||
if ( realvalue >= 0.9999f || realvalue < 0.00f )
|
||||
{
|
||||
LOG( WARNING ) << "alpha value is invalid setting to 1.0";
|
||||
settings::setSetting(
|
||||
|
||||
Reference in New Issue
Block a user