|
@@ -32,12 +32,15 @@ namespace bbiwarg.Detectors.Touch
|
|
|
float floodValue = getFloodValue((int)tipPoint.X, (int)tipPoint.Y);
|
|
|
if (floodValue > floodValueThreshold)
|
|
|
{
|
|
|
+ /* disabled -> direction doesn't along finger
|
|
|
//correct touchEvent position
|
|
|
Vector2D direction = finger.Line.Direction;
|
|
|
float directionFactor = -10;
|
|
|
float x = Math.Min(Math.Max(tipPoint.X + directionFactor * direction.X, 0), depthImage.getWidth()-1);
|
|
|
float y = Math.Min(Math.Max(tipPoint.Y + directionFactor * direction.Y, 0), depthImage.getHeight()-1);
|
|
|
Vector2D tep = new Vector2D(x,y);
|
|
|
+ */
|
|
|
+ Vector2D tep = tipPoint;
|
|
|
|
|
|
touchImage.setTouchAt((int)tep.X, (int)tep.Y, TouchImageState.touchDetected);
|
|
|
TouchEvent touchEvent = new TouchEvent((int)tep.X, (int)tep.Y, floodValue, finger);
|