mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 09:31:20 -08:00
SpotlessApply
This commit is contained in:
1 parent
a1c4de8152
commit
349666b8cd
6 files changed
+262
-260
No files matched your search
@@ -16,7 +16,7 @@ data class RawBone(
|
||||
val offset: Vector3,
|
||||
val rawRotation: Quaternion,
|
||||
val rawPosition: Vector3,
|
||||
val isReceivingData : Boolean, // TODO set it with an action or whatever
|
||||
val isReceivingData: Boolean, // TODO set it with an action or whatever
|
||||
)
|
||||
|
||||
data class BoneState(
|
||||
@@ -102,7 +102,7 @@ class Skeleton(
|
||||
processors = listOf(
|
||||
FallbackProcessor(),
|
||||
ImputeSpineProcessor(ctx.config.settings),
|
||||
PredictionProcessor(ctx.config.settings),
|
||||
PredictionProcessor(ctx.config.settings),
|
||||
SmoothingProcessor(ctx.config.settings),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -11,15 +11,11 @@ interface SkeletonProcessor {
|
||||
}
|
||||
|
||||
class FallbackProcessor : SkeletonProcessor {
|
||||
override fun process(state: SkeletonState): SkeletonState {
|
||||
return state
|
||||
}
|
||||
override fun process(state: SkeletonState): SkeletonState = state
|
||||
}
|
||||
|
||||
class ImputeSpineProcessor(val settings: Settings) : SkeletonProcessor {
|
||||
override fun process(state: SkeletonState): SkeletonState {
|
||||
return state
|
||||
}
|
||||
override fun process(state: SkeletonState): SkeletonState = state
|
||||
}
|
||||
|
||||
class SmoothingProcessor(val settings: Settings) : SkeletonProcessor {
|
||||
@@ -50,10 +46,10 @@ class SmoothingProcessor(val settings: Settings) : SkeletonProcessor {
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val SMOOTH_MIN = 0.7f
|
||||
private const val SMOOTH_MAX = 0.95f
|
||||
}
|
||||
companion object {
|
||||
private const val SMOOTH_MIN = 0.63f
|
||||
private const val SMOOTH_MAX = 0.94f
|
||||
}
|
||||
}
|
||||
|
||||
class PredictionProcessor(val settings: Settings) : SkeletonProcessor {
|
||||
|
||||
@@ -91,8 +91,8 @@ class TapDetectionBasicBehaviour : TapDetectionBehaviour {
|
||||
if (setupMode) {
|
||||
receiver.server.sendSolarxrRpc(
|
||||
TapDetectionSetupNotification(
|
||||
trackerTapDetectionState.trackerId.toUShort()
|
||||
)
|
||||
trackerTapDetectionState.trackerId.toUShort(),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -217,12 +217,12 @@ class TapDetectionBasicBehaviour : TapDetectionBehaviour {
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val NS_CONVERTER = 1.0e9f
|
||||
companion object {
|
||||
const val NS_CONVERTER = 1.0e9f
|
||||
const val ACCEL_WINDOW_NS = 0.06f * NS_CONVERTER
|
||||
const val TAP_WINDOW_PER_TAP_NS = 0.3f * NS_CONVERTER
|
||||
const val NEEDED_ACCEL_DELTA = 6.0f
|
||||
const val ALLOWED_BODY_ACCEL = 2.5f
|
||||
const val ALLOWED_BODY_ACCEL_SQUARED = ALLOWED_BODY_ACCEL * ALLOWED_BODY_ACCEL
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user