mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 14:12:26 +02:00
Pass armCircumference and shoulderWidth to qml.
This commit is contained in:
parent
2a45c6d3dc
commit
8dc9714282
2 changed files with 10 additions and 0 deletions
|
@ -878,6 +878,9 @@ Rectangle {
|
|||
var viveController = settings["handController"];
|
||||
var desktopMode = settings["desktopMode"];
|
||||
|
||||
armCircumference.value = settings.armCircumference;
|
||||
shoulderWidth.value = settings.shoulderWidth;
|
||||
|
||||
if (HmdHead) {
|
||||
headBox.checked = true;
|
||||
headPuckBox.checked = false;
|
||||
|
|
|
@ -375,6 +375,7 @@ void ViveControllerManager::InputDevice::calibrateFromUI(const controller::Input
|
|||
}
|
||||
|
||||
static const float CM_TO_M = 0.01f;
|
||||
static const float M_TO_CM = 100.0f;
|
||||
|
||||
void ViveControllerManager::InputDevice::configureCalibrationSettings(const QJsonObject configurationSettings) {
|
||||
Locker locker(_lock);
|
||||
|
@ -411,6 +412,10 @@ void ViveControllerManager::InputDevice::configureCalibrationSettings(const QJso
|
|||
_armCircumference = shoulderObj["armCircumference"].toDouble() * CM_TO_M;
|
||||
_shoulderWidth = shoulderObj["shoulderWidth"].toDouble() * CM_TO_M;
|
||||
}
|
||||
} else if (iter.key() == "armCircumference") {
|
||||
_armCircumference = (float)iter.value().toDouble() * CM_TO_M;
|
||||
} else if (iter.key() == "shoulderWidth") {
|
||||
_shoulderWidth = (float)iter.value().toDouble() * CM_TO_M;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
@ -429,6 +434,8 @@ QJsonObject ViveControllerManager::InputDevice::configurationSettings() {
|
|||
configurationSettings["HMDHead"] = (_headConfig == HeadConfig::HMD);
|
||||
configurationSettings["handController"] = (_handConfig == HandConfig::HandController);
|
||||
configurationSettings["puckCount"] = (int)_validTrackedObjects.size();
|
||||
configurationSettings["armCircumference"] = (double)_armCircumference * M_TO_CM;
|
||||
configurationSettings["shoulderWidth"] = (double)_shoulderWidth * M_TO_CM;
|
||||
return configurationSettings;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue