From ac07e65b272ae16fdbe433f872048a780eb7c6cd Mon Sep 17 00:00:00 2001 From: loucass003 Date: Sat, 11 Apr 2026 08:35:26 +0200 Subject: [PATCH] Clenup dead code --- .../main/java/dev/slimevr/skeleton/module.kt | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/skeleton/module.kt b/server/core/src/main/java/dev/slimevr/skeleton/module.kt index 89f57b6c1..cc62758fb 100644 --- a/server/core/src/main/java/dev/slimevr/skeleton/module.kt +++ b/server/core/src/main/java/dev/slimevr/skeleton/module.kt @@ -19,19 +19,14 @@ data class BoneState( val rotation: Quaternion = Quaternion.IDENTITY, val headPosition: Vector3 = Vector3.NULL, val tailPosition: Vector3 = Vector3.NULL, - val parentBone: BodyPart? = null, + val parentBone: BoneState? = null, ) { - val localTailPosition: Vector3 get() = tailPosition - headPosition - - fun localRotation(bones: Map): Quaternion { - val parent = parentBone?.let { bones[it] } ?: return rotation - return parent.rotation.inv() * rotation - } - - fun localHeadPosition(bones: Map): Vector3 { - val parent = parentBone?.let { bones[it] } ?: return headPosition - return headPosition - parent.tailPosition - } + val localRotation: Quaternion + get() = parentBone?.let { it.rotation.inv() * rotation } ?: rotation + val localHeadPosition: Vector3 + get() = parentBone?.let { headPosition - it.tailPosition } ?: headPosition + val localTailPosition: Vector3 + get() = tailPosition - headPosition } private val BONE_TAIL_OFFSETS: Map = run { @@ -117,7 +112,7 @@ fun buildBones(state: SkeletonState, rootHead: Vector3 = Vector3.NULL): Map