Package java.awt

Examples of java.awt.Point.distance()


        }

        scalePoint(beforeP, beforeC);
        scalePoint(afterP, afterC);

        if (afterP.distance(beforeP) < this.threshold) {
            // TODO: lowpass
        } else {
            // TODO: highpass
        }
        throw new NotImplementedException();
View Full Code Here


        // Here we check if a new point is inside or outside the current area of the fixation list
        // If it is inside (code far down below), we will simply add the new point, this is the "good"
        // case. If the point is outside a given radius, we need some logic to decide what to do.
        // Basically this can be caused by two things: A random outlier (measurement failure), or a
        // systematic gaze to another position.
        if (center.distance(filteredEvent.getGazeCenter()) > this.radiusFixationTime) {

            // In any case, increase the number of outliers and add the new "bad point"
            this.numConsecutiveOutliers++;
            this.outliers.add(filteredEvent);
View Full Code Here

        float max = Float.MIN_VALUE;

        for (final EyeTrackingEvent trackingEvent : events) {
            final Point p = trackingEvent.getGazeCenter();

            max = (float) Math.max(p.distance(center), max);
        }

        return max;
    }
}
View Full Code Here

        float maxDist = 0;

        for (final EyeTrackingEvent trackingEvent : this.trackingEvents) {
            final Point gazeCenter = trackingEvent.getGazeCenter();

            maxDist = (float) Math.max(maxDist, gazeCenter.distance(center));
        }

        return (int) maxDist;
    }
View Full Code Here

      // Determine if there is too much overlap with other animals
      final double tooClose = new Point(width, height).distance(new Point(0, 0)) / 2.0;
      boolean tooMuchOverlap = false;
      for (final PlacedAnimal animal : animals)
      {
        if (point.distance(animal.location) < tooClose)
        {
          tooMuchOverlap = true;
          break;
        }
      }
View Full Code Here

      // Determine if there is too much overlap with other animals
      final double tooClose = new Point(width, height).distance(new Point(0, 0)) / 2.0;
      boolean tooMuchOverlap = false;
      for (final PlacedAnimal animal : animals)
      {
        if (point.distance(animal.location) < tooClose)
        {
          tooMuchOverlap = true;
          break;
        }
      }
View Full Code Here

      // Determine if there is too much overlap with other animals
      final double tooClose = new Point(width, height).distance(new Point(0, 0)) / 2.0;
      boolean tooMuchOverlap = false;
      for (final PlacedAnimal animal : animals)
      {
        if (point.distance(animal.location) < tooClose)
        {
          tooMuchOverlap = true;
          break;
        }
      }
View Full Code Here

            Point curr = evt.getPoint();
           
            if(isDragEnabled()) {
                //log.fine("testing drag enabled: " + curr + " " + start);
                //log.fine("distance = " + curr.distance(start));
                if(curr.distance(start) > 5) {
                    JXImageView.this.log.fine("starting the drag: ");
                    panel.getTransferHandler().exportAsDrag((JComponent)evt.getSource(),evt,TransferHandler.COPY);
                    return;
                }
            }
View Full Code Here

      // Determine if there is too much overlap with other animals
      final double tooClose = new Point(width, height).distance(new Point(0, 0)) / 2.0;
      boolean tooMuchOverlap = false;
      for (final PlacedAnimal animal : animals)
      {
        if (point.distance(animal.location) < tooClose)
        {
          tooMuchOverlap = true;
          break;
        }
      }
View Full Code Here

        Point point;

        for( int i = 0; i < points_.size(); i++ )
        {
            point = (Point)points_.get( i );
            if (point.distance(p) < 10.0)
            {
                return true;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.