Commit 1235cc0a authored by Alexander Krause's avatar Alexander Krause

quick fixes for tomorrow's benchmark

parent 0dc0d94f
......@@ -48,8 +48,7 @@ namespace ExplorVizGestureControl.Gestures
// dynamic values initialization, based on gui
dynamicValues.Add("scrollAccelerationFactor", 2000);
dynamicValues.Add("scrollForwardFactor", 0.05);
dynamicValues.Add("scrollBackwardFactor", 0.05);
dynamicValues.Add("scrollActivation", 0.05);
dynamicValues.Add("zoomVelocity", 250);
dynamicValues.Add("rotationVelocityX", 1000);
dynamicValues.Add("rotationVelocityY", 500);
......@@ -127,10 +126,8 @@ 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 > dynamicValues["rotationYActivation"]) yDetection = dynamicValues["rotationVelocityY"];
Console.WriteLine(handsAbsDistanceY);
if (handsAbsDistanceY > dynamicValues["rotationYActivation"]) yDetection = (int)dynamicValues["rotationVelocityY"];
distanceZ = distanceZHands - (GestureDatabase.PreviousFrameJoints[(int)JointType.HandLeft].Z - GestureDatabase.PreviousFrameJoints[(int)JointType.HandRight].Z);
distanceY = distanceYHands - (GestureDatabase.PreviousFrameJoints[(int)JointType.HandLeft].Y - GestureDatabase.PreviousFrameJoints[(int)JointType.HandRight].Y);
......@@ -154,7 +151,7 @@ namespace ExplorVizGestureControl.Gestures
double distance = GestureDatabase.Joints[(int)JointType.SpineBase].Z -
GestureDatabase.PreviousFrameJoints[(int)JointType.SpineBase].Z;
if (Math.Abs(distance) != dynamicValues["scrollForwardFactor"])
if (Math.Abs(distance) != dynamicValues["scrollActivation"])
{
scrollValue = (int)(distance * dynamicValues["scrollAccelerationFactor"]);
}
......
......@@ -71,36 +71,20 @@
<TextBox
Style="{StaticResource DynamicValues}"
Name="scrollForwardFactor"
Text="0,07"
Name="scrollActivation"
Text="0,05"
KeyDown="OnKeyDownHandler">
<TextBox.ToolTip>
<ToolTip>
<StackPanel>
<Label FontWeight="Bold" Content="Value for recognition of forward-leaning"/>
<Label FontWeight="Bold" Content="Value for recognition of scrolling"/>
<Label FontWeight="Thin" Content="Smaller values lead to quicker response."/>
<Label Content="This value might need to be changed due to different bodies and distances."/>
</StackPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>
<TextBox
Style="{StaticResource DynamicValues}"
Name="scrollBackwardFactor"
Text="0,02"
KeyDown="OnKeyDownHandler">
<TextBox.ToolTip>
<ToolTip>
<StackPanel>
<Label FontWeight="Bold" Content="Value for recognition of backward-leaning"/>
<Label FontWeight="Thin" Content="Bigger values lead to quicker response."/>
<Label Content="This value might need to be changed due to different bodies and distances."/>
</StackPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>
<TextBox
Style="{StaticResource DynamicValues}"
Name="zoomVelocity"
......
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AA57CCF478F66EA13826A7F1E130DE25"
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2981D8CCF2323F86346A1F0B30824AC0"
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
......@@ -82,7 +82,7 @@ namespace ExplorVizGestureControl {
#line 74 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox scrollForwardFactor;
internal System.Windows.Controls.TextBox scrollActivation;
#line default
#line hidden
......@@ -90,7 +90,7 @@ namespace ExplorVizGestureControl {
#line 90 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox scrollBackwardFactor;
internal System.Windows.Controls.TextBox zoomVelocity;
#line default
#line hidden
......@@ -98,7 +98,23 @@ namespace ExplorVizGestureControl {
#line 106 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox zoomVelocity;
internal System.Windows.Controls.TextBox rotationVelocityX;
#line default
#line hidden
#line 121 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox rotationVelocityY;
#line default
#line hidden
#line 136 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox rotationYActivation;
#line default
#line hidden
......@@ -169,28 +185,46 @@ namespace ExplorVizGestureControl {
#line hidden
return;
case 7:
this.scrollForwardFactor = ((System.Windows.Controls.TextBox)(target));
this.scrollActivation = ((System.Windows.Controls.TextBox)(target));
#line 76 "..\..\MainWindow.xaml"
this.scrollForwardFactor.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.scrollActivation.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 8:
this.scrollBackwardFactor = ((System.Windows.Controls.TextBox)(target));
this.zoomVelocity = ((System.Windows.Controls.TextBox)(target));
#line 92 "..\..\MainWindow.xaml"
this.scrollBackwardFactor.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.zoomVelocity.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 9:
this.zoomVelocity = ((System.Windows.Controls.TextBox)(target));
this.rotationVelocityX = ((System.Windows.Controls.TextBox)(target));
#line 108 "..\..\MainWindow.xaml"
this.zoomVelocity.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.rotationVelocityX.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 10:
this.rotationVelocityY = ((System.Windows.Controls.TextBox)(target));
#line 123 "..\..\MainWindow.xaml"
this.rotationVelocityY.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 11:
this.rotationYActivation = ((System.Windows.Controls.TextBox)(target));
#line 138 "..\..\MainWindow.xaml"
this.rotationYActivation.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
......
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AA57CCF478F66EA13826A7F1E130DE25"
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2981D8CCF2323F86346A1F0B30824AC0"
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
......@@ -82,7 +82,7 @@ namespace ExplorVizGestureControl {
#line 74 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox scrollForwardFactor;
internal System.Windows.Controls.TextBox scrollActivation;
#line default
#line hidden
......@@ -90,7 +90,7 @@ namespace ExplorVizGestureControl {
#line 90 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox scrollBackwardFactor;
internal System.Windows.Controls.TextBox zoomVelocity;
#line default
#line hidden
......@@ -98,7 +98,23 @@ namespace ExplorVizGestureControl {
#line 106 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox zoomVelocity;
internal System.Windows.Controls.TextBox rotationVelocityX;
#line default
#line hidden
#line 121 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox rotationVelocityY;
#line default
#line hidden
#line 136 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox rotationYActivation;
#line default
#line hidden
......@@ -169,28 +185,46 @@ namespace ExplorVizGestureControl {
#line hidden
return;
case 7:
this.scrollForwardFactor = ((System.Windows.Controls.TextBox)(target));
this.scrollActivation = ((System.Windows.Controls.TextBox)(target));
#line 76 "..\..\MainWindow.xaml"
this.scrollForwardFactor.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.scrollActivation.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 8:
this.scrollBackwardFactor = ((System.Windows.Controls.TextBox)(target));
this.zoomVelocity = ((System.Windows.Controls.TextBox)(target));
#line 92 "..\..\MainWindow.xaml"
this.scrollBackwardFactor.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.zoomVelocity.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 9:
this.zoomVelocity = ((System.Windows.Controls.TextBox)(target));
this.rotationVelocityX = ((System.Windows.Controls.TextBox)(target));
#line 108 "..\..\MainWindow.xaml"
this.zoomVelocity.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
this.rotationVelocityX.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 10:
this.rotationVelocityY = ((System.Windows.Controls.TextBox)(target));
#line 123 "..\..\MainWindow.xaml"
this.rotationVelocityY.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
return;
case 11:
this.rotationYActivation = ((System.Windows.Controls.TextBox)(target));
#line 138 "..\..\MainWindow.xaml"
this.rotationYActivation.KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);
#line default
#line hidden
......
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