Commit 0dc0d94f authored by Alexander Krause's avatar Alexander Krause

added dynamic value for y axis detection in rotation

parent cd2a4223
......@@ -53,6 +53,7 @@ namespace ExplorVizGestureControl.Gestures
dynamicValues.Add("zoomVelocity", 250);
dynamicValues.Add("rotationVelocityX", 1000);
dynamicValues.Add("rotationVelocityY", 500);
dynamicValues.Add("rotationYActivation", 0.12);
scrollTimer = new GestureTimer(dynamicValues["zoomVelocity"]);
delayTimer = new GestureTimer(2000);
......@@ -126,7 +127,7 @@ namespace ExplorVizGestureControl.Gestures
int yDetection = 0;
float handsAbsDistanceY = Math.Abs(Math.Abs(GestureDatabase.Joints[(int)JointType.HandLeft].Y) - Math.Abs(GestureDatabase.Joints[(int)JointType.HandRight].Y));
if (handsAbsDistanceY > 0.12f) yDetection = dynamicValues["rotationVelocityY"];
if (handsAbsDistanceY > dynamicValues["rotationYActivation"]) yDetection = dynamicValues["rotationVelocityY"];
Console.WriteLine(handsAbsDistanceY);
......
......@@ -147,6 +147,22 @@
</TextBox.ToolTip>
</TextBox>
<TextBox
Style="{StaticResource DynamicValues}"
Name="rotationYActivation"
Text="0.12"
KeyDown="OnKeyDownHandler">
<TextBox.ToolTip>
<ToolTip>
<StackPanel>
<Label FontWeight="Bold" Content="Distance (in cm) for y-axis activation"/>
<Label FontWeight="Thin" Content="Smaller values lead to fast-response detection."/>
<Label Content="Standard value: 500"/>
</StackPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>
</StackPanel>
</Grid>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment