Commit c8cff2e1 authored by Alexander Krause's avatar Alexander Krause

overhaul

parent 984d2b31
......@@ -50,7 +50,7 @@ namespace ExplorVizGestureControl.Gestures
// dynamic values initialization, based on gui
dynamicValues.Add("scrollAccelerationFactor", 2000);
dynamicValues.Add("scrollActivation", 0.05);
dynamicValues.Add("zoomVelocity", 1000);
dynamicValues.Add("zoomVelocity", 700);
dynamicValues.Add("rotationVelocityX", 2000);
dynamicValues.Add("rotationVelocityY", 1000);
dynamicValues.Add("rotationYActivation", 0.04);
......@@ -177,29 +177,27 @@ namespace ExplorVizGestureControl.Gestures
{
if (rotationActive || zoomingActive) return;
if (!GestureDatabase.DragObject() && selectionStatus == 1)
if (!GestureDatabase.RightHandClosed() && selectionStatus == 1)
{
selectionStatus = 2;
selectionTimer.startTimer();
selectionStatus = 2;
}
//if (!GestureDatabase.DragObject() && selectionStatus == 2 && !selectionTimer.busy)
if (!GestureDatabase.DragObject() && selectionStatus == 2)
if (!GestureDatabase.RightHandClosed() && selectionStatus == 2)
{
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
selectionStatus = 0;
}
//if (!GestureDatabase.DragObject() && selectionStatus == 3 && selectionTimer.busy)
if (!GestureDatabase.DragObject() && selectionStatus == 3)
/* if (!GestureDatabase.DragObject() && selectionStatus == 3)
{
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
//Thread.Sleep(150);
// mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
selectionStatus = 0;
}
}*/
if (GestureDatabase.DragObject())
if (GestureDatabase.RightHandClosed())
{
if (selectionStatus == 0)
{
......@@ -212,15 +210,14 @@ namespace ExplorVizGestureControl.Gestures
if (selectionStatus == 2) selectionStatus = 3;
// If hand position didn't change 1 cm, do no more processing for this frame
// If hand position didn't change 1 cm (in x, y or z), do no more processing for this frame
if (Math.Abs(rightHandAnchorLength - vLength) < 0.01f) return;
// Else handle grip processing
if (!gripActive)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
gripActive = true;
selectionTimer.stopTimer();
gripActive = true;
}
double distanceX = GestureDatabase.Joints[(int)JointType.HandRight].X -
......@@ -236,7 +233,7 @@ namespace ExplorVizGestureControl.Gestures
else if (gripActive)
{
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
selectionStatus = 0;
//selectionStatus = 0;
gripActive = false;
}
}
......
......@@ -269,11 +269,6 @@ namespace ExplorVizGestureControl.Gestures
#region Gestures
public static Boolean DragObject()
{
return RightHandClosed();
}
public static Boolean OpenObject()
{
return LeftHandBelowLeftShoulder() && LeftHandClosed() && RightHandClosed();
......
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