Implement Seated Universe and Raw (Room Setup) Universe Support (#150)
* Add checks for seated improve shutdown state Seated mode chaperone update is still broken. Normal standing mode space motion needs testing on WMR and Rift * Fix updating chaperone on room setup completion * Implement seated universe recenter/offsets/motion Addresses #145 * Add Option "Allow External App Chaperone Edits" This option is added to the settings tab. It allows external apps to modify the chaperone but only if the current offset is 0,0,0 and rotation is 0. The option is disabled by default.
This commit is contained in:
@@ -68,6 +68,11 @@ class MoveCenterTabController : public QObject
|
||||
requireLockYChanged )
|
||||
Q_PROPERTY( bool lockZToggle READ lockZToggle WRITE setLockZ NOTIFY
|
||||
requireLockZChanged )
|
||||
Q_PROPERTY(
|
||||
bool showLogMatricesButton READ showLogMatricesButton WRITE
|
||||
setShowLogMatricesButton NOTIFY showLogMatricesButtonChanged )
|
||||
Q_PROPERTY( bool allowExternalEdits READ allowExternalEdits WRITE
|
||||
setAllowExternalEdits NOTIFY allowExternalEditsChanged )
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
@@ -100,6 +105,7 @@ private:
|
||||
float m_gravityFloor = 0.0f;
|
||||
float m_gravityStrength = 9.8f;
|
||||
float m_flingStrength = 1.0f;
|
||||
float m_seatedHeight = 1.0f;
|
||||
bool m_momentumSave = false;
|
||||
bool m_lockXToggle = false;
|
||||
bool m_lockYToggle = false;
|
||||
@@ -138,6 +144,10 @@ private:
|
||||
bool m_chaperoneCommitted = true;
|
||||
bool m_pendingZeroOffsets = true;
|
||||
bool m_dashWasOpenPreviousFrame = false;
|
||||
bool m_roomSetupModeDetected = false;
|
||||
bool m_seatedModeDetected = false;
|
||||
bool m_showLogMatricesButton = false;
|
||||
bool m_allowExternalEdits = false;
|
||||
unsigned settingsUpdateCounter = 0;
|
||||
int m_hmdRotationStatsUpdateCounter = 0;
|
||||
unsigned m_dragComfortFrameSkipCounter = 0;
|
||||
@@ -148,6 +158,7 @@ private:
|
||||
vr::HmdQuad_t* m_collisionBoundsForReset;
|
||||
uint32_t m_collisionBoundsCountForReset = 0;
|
||||
vr::HmdMatrix34_t m_universeCenterForReset;
|
||||
vr::HmdMatrix34_t m_seatedCenterForReset;
|
||||
vr::HmdQuad_t* m_collisionBoundsForOffset;
|
||||
|
||||
void updateHmdRotationCounter( vr::TrackedDevicePose_t hmdPose,
|
||||
@@ -160,6 +171,7 @@ private:
|
||||
void updateChaperoneResetData();
|
||||
void applyChaperoneResetData();
|
||||
void saveUncommittedChaperone();
|
||||
void outputLogHmdMatrix( vr::HmdMatrix34_t hmdMatrix );
|
||||
|
||||
public:
|
||||
void initStage1();
|
||||
@@ -190,8 +202,11 @@ public:
|
||||
bool lockXToggle() const;
|
||||
bool lockYToggle() const;
|
||||
bool lockZToggle() const;
|
||||
bool showLogMatricesButton() const;
|
||||
bool allowExternalEdits() const;
|
||||
double getHmdYawTotal();
|
||||
void resetHmdYawTotal();
|
||||
void incomingSeatedReset();
|
||||
|
||||
// actions:
|
||||
void leftHandSpaceDrag( bool leftHandDragActive );
|
||||
@@ -247,8 +262,13 @@ public slots:
|
||||
void setLockX( bool value, bool notify = true );
|
||||
void setLockY( bool value, bool notify = true );
|
||||
void setLockZ( bool value, bool notify = true );
|
||||
void setShowLogMatricesButton( bool value, bool notify = true );
|
||||
void setAllowExternalEdits( bool value, bool notify = true );
|
||||
|
||||
void shutdown();
|
||||
void reset();
|
||||
void updateSeatedResetData();
|
||||
void outputLogPoses();
|
||||
void zeroOffsets();
|
||||
|
||||
signals:
|
||||
@@ -275,6 +295,8 @@ signals:
|
||||
void requireLockXChanged( bool value );
|
||||
void requireLockYChanged( bool value );
|
||||
void requireLockZChanged( bool value );
|
||||
void showLogMatricesButtonChanged( bool value );
|
||||
void allowExternalEditsChanged( bool value );
|
||||
};
|
||||
|
||||
} // namespace advsettings
|
||||
|
||||
Reference in New Issue
Block a user