Class Ellipse2dJNI

java.lang.Object
edu.wpi.first.math.jni.WPIMathJNI
edu.wpi.first.math.jni.Ellipse2dJNI

public final class Ellipse2dJNI extends WPIMathJNI
Ellipse2d JNI.
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.wpi.first.math.jni.WPIMathJNI

    WPIMathJNI.Helper
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    nearest(double centerX, double centerY, double centerHeading, double xSemiAxis, double ySemiAxis, double pointX, double pointY, double[] nearestPoint)
    Returns the nearest point that is contained within the ellipse.

    Methods inherited from class edu.wpi.first.math.jni.WPIMathJNI

    forceLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • nearest

      public static void nearest(double centerX, double centerY, double centerHeading, double xSemiAxis, double ySemiAxis, double pointX, double pointY, double[] nearestPoint)
      Returns the nearest point that is contained within the ellipse.

      Constructs an Ellipse2d object and runs its nearest() method.

      Parameters:
      centerX - The x coordinate of the center of the ellipse in meters.
      centerY - The y coordinate of the center of the ellipse in meters.
      centerHeading - The ellipse's rotation in radians.
      xSemiAxis - The x semi-axis in meters.
      ySemiAxis - The y semi-axis in meters.
      pointX - The x coordinate of the point that this will find the nearest point to.
      pointY - The y coordinate of the point that this will find the nearest point to.
      nearestPoint - Array to store nearest point into.