mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-27 12:26:33 -08:00
Rename processors
This commit is contained in:
1 parent
1b40f12791
commit
28eb411ecb
4 files changed
+10
-11
No files matched your search
+1
-1
@@ -21,7 +21,7 @@ val PREDICTION_LEAD = 10.milliseconds
|
||||
/**
|
||||
* Tries to predict future rotations of bones.
|
||||
*/
|
||||
class BonePredictionInputProcessor(val settings: Settings) :
|
||||
class PredictionInputProcessor(val settings: Settings) :
|
||||
SkeletonInputProcessor,
|
||||
ResettableSkeletonProcessor {
|
||||
private data class BoneDelta(
|
||||
+2
-2
@@ -56,7 +56,7 @@ private fun reliabilityOf(bodyPart: BodyPart, source: SpineSource): Float = when
|
||||
// From
|
||||
SpineSource.UPPER_CHEST -> 10f
|
||||
|
||||
// To
|
||||
// To (negative to relax the spine
|
||||
SpineSource.UPPER_WAIST -> -1.5f
|
||||
|
||||
SpineSource.LOWER_WAIST -> -2f
|
||||
@@ -119,7 +119,7 @@ private fun reliabilityOf(bodyPart: BodyPart, source: SpineSource): Float = when
|
||||
*
|
||||
* Similar to FallbackProcessor specifically for the waist and hip.
|
||||
*/
|
||||
class SpineImputeInputProcessor(val settings: Settings) : SkeletonInputProcessor {
|
||||
class RelaxedSpineInputProcessor(val settings: Settings) : SkeletonInputProcessor {
|
||||
override fun process(mutableInputSkeleton: InputSkeleton, skeletonHeight: Float) {
|
||||
val ratios = settings.context.state.value.data.skeletonConfig.ratios
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ private const val SMOOTH_MAX = 0.95f
|
||||
/**
|
||||
* Running average of bone rotations to smooth them out.
|
||||
*/
|
||||
class BoneSmoothingInputProcessor(val settings: Settings) :
|
||||
class SmoothingInputProcessor(val settings: Settings) :
|
||||
SkeletonInputProcessor,
|
||||
ResettableSkeletonProcessor {
|
||||
private var smoothed: BodyPartMap<Quaternion> = bodyPartMap()
|
||||
@@ -1,7 +1,6 @@
|
||||
package dev.slimevr.skeleton
|
||||
|
||||
import dev.slimevr.Phase1ContextProvider
|
||||
import dev.slimevr.config.Settings
|
||||
import dev.slimevr.context.Behaviour
|
||||
import dev.slimevr.context.Context
|
||||
import dev.slimevr.skeleton.computedprocessors.VelocityComputedProcessor
|
||||
@@ -10,14 +9,14 @@ import dev.slimevr.skeleton.fkprocessors.LocalizerFkProcessor
|
||||
import dev.slimevr.skeleton.fkprocessors.ToeSnapFkProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.BoneActiveLinkInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.BoneDirectLinkInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.BonePredictionInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.BoneSmoothingInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.PredictionInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.SmoothingInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.BoneYawFallbackInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.ConstraintInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.FingerImputeInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.HeadPositionFallbackProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.HipYawRollAlignInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.SpineImputeInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.RelaxedSpineInputProcessor
|
||||
import dev.slimevr.skeleton.inputprocessors.UpperLegsRollAlignInputProcessor
|
||||
import dev.slimevr.skeleton.targetprocessors.FloorClipTargetProcessor
|
||||
import dev.slimevr.skeleton.targetprocessors.SkatingCorrectionTargetProcessor
|
||||
@@ -220,12 +219,12 @@ class Skeleton(
|
||||
hz = hz,
|
||||
waiter = waiter,
|
||||
inputProcessors = listOf(
|
||||
BonePredictionInputProcessor(settings).also { resettableSkeletonProcessors.add(it) },
|
||||
BoneSmoothingInputProcessor(settings).also { resettableSkeletonProcessors.add(it) },
|
||||
PredictionInputProcessor(settings).also { resettableSkeletonProcessors.add(it) },
|
||||
SmoothingInputProcessor(settings).also { resettableSkeletonProcessors.add(it) },
|
||||
HeadPositionFallbackProcessor(settings),
|
||||
BoneYawFallbackInputProcessor(),
|
||||
BoneActiveLinkInputProcessor(),
|
||||
SpineImputeInputProcessor(settings),
|
||||
RelaxedSpineInputProcessor(settings),
|
||||
HipYawRollAlignInputProcessor(settings),
|
||||
UpperLegsRollAlignInputProcessor(settings),
|
||||
BoneDirectLinkInputProcessor(),
|
||||
|
||||
Reference in new issue
Block a user