mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
AutoBone: Properly handle ratio output
This commit is contained in:
2 files changed
+21
-10
No files matched your search
@@ -178,6 +178,26 @@ public class SkeletonConfig extends EJBag {
|
||||
|
||||
LogManager.log.info("[AutoBone] Done processing!");
|
||||
|
||||
//#region Stats/Values
|
||||
Float neckLength = autoBone.configs.get("Neck");
|
||||
Float chestLength = autoBone.configs.get("Chest");
|
||||
Float waistLength = autoBone.configs.get("Waist");
|
||||
Float hipWidth = autoBone.configs.get("Hips width");
|
||||
Float legsLength = autoBone.configs.get("Legs length");
|
||||
Float kneeHeight = autoBone.configs.get("Knee height");
|
||||
|
||||
float neckWaist = neckLength != null && waistLength != null ? neckLength / waistLength : 0f;
|
||||
float chestWaist = chestLength != null && waistLength != null ? chestLength / waistLength : 0f;
|
||||
float hipWaist = hipWidth != null && waistLength != null ? hipWidth / waistLength : 0f;
|
||||
float legWaist = legsLength != null && waistLength != null ? legsLength / waistLength : 0f;
|
||||
float kneeLeg = kneeHeight != null && legsLength != null ? kneeHeight / legsLength : 0f;
|
||||
|
||||
LogManager.log.info("[AutoBone] Ratios: [{Neck-Waist: " + StringUtils.prettyNumber(neckWaist) +
|
||||
"}, {Chest-Waist: " + StringUtils.prettyNumber(chestWaist) +
|
||||
"}, {Hip-Waist: " + StringUtils.prettyNumber(hipWaist) +
|
||||
"}, {Leg-Waist: " + StringUtils.prettyNumber(legWaist) +
|
||||
"}, {Knee-Leg: " + StringUtils.prettyNumber(kneeLeg) + "}]");
|
||||
|
||||
boolean first = true;
|
||||
StringBuilder configInfo = new StringBuilder("[");
|
||||
|
||||
@@ -212,6 +232,7 @@ public class SkeletonConfig extends EJBag {
|
||||
|
||||
LogManager.log.info("[AutoBone] Average height error: " + StringUtils.prettyNumber(mean, 6) + " (SD " + StringUtils.prettyNumber(std, 6) + ")");
|
||||
}
|
||||
//#endregion
|
||||
|
||||
// Update GUI values after adjustment
|
||||
refreshAll();
|
||||
|
||||
Reference in new issue
Block a user