Class Ellipse

All Implemented Interfaces:
JsonSerializable

@NullMarked public class Ellipse extends Marker<Ellipse>
Represents an ellipse marker.
  • Constructor Details

    • Ellipse

      public Ellipse(String key, double centerX, double centerZ, double radiusX, double radiusZ)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radiusX - x radius
      radiusZ - z radius
    • Ellipse

      public Ellipse(String key, Point center, double radiusX, double radiusZ)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radiusX - x radius
      radiusZ - z radius
    • Ellipse

      public Ellipse(String key, double centerX, double centerZ, Vector radius)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - radius
    • Ellipse

      public Ellipse(String key, Point center, Vector radius)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radius - radius
    • Ellipse

      public Ellipse(String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radiusX - x radius
      radiusZ - z radius
      tilt - tilt
    • Ellipse

      public Ellipse(String key, Point center, double radiusX, double radiusZ, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radiusX - x radius
      radiusZ - z radius
      tilt - tilt
    • Ellipse

      public Ellipse(String key, double centerX, double centerZ, Vector radius, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - radius
      tilt - tilt
    • Ellipse

      public Ellipse(String key, Point center, Vector radius, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radius - radius
      tilt - tilt
  • Method Details

    • of

      public static Ellipse of(String key, double centerX, double centerZ, double radiusX, double radiusZ)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radiusX - x radius
      radiusZ - z radius
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, Point center, double radiusX, double radiusZ)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radiusX - x radius
      radiusZ - z radius
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, double centerX, double centerZ, Vector radius)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - radius
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, Point center, Vector radius)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radius - radius
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radiusX - x radius
      radiusZ - z radius
      tilt - tilt
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, Point center, double radiusX, double radiusZ, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radiusX - x radius
      radiusZ - z radius
      tilt - tilt
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, double centerX, double centerZ, Vector radius, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - radius
      tilt - tilt
      Returns:
      a new ellipse
    • of

      public static Ellipse of(String key, Point center, Vector radius, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radius - radius
      tilt - tilt
      Returns:
      a new ellipse
    • getCenter

      public Point getCenter()
      Get the center Point of this ellipse.
      Returns:
      center point
    • setCenter

      public Ellipse setCenter(Point center)
      Set a new center Point for this ellipse.
      Parameters:
      center - new center
      Returns:
      this ellipse
    • getRadius

      public Vector getRadius()
      Get the radius for this ellipse.
      Returns:
      radius
    • setRadius

      public Ellipse setRadius(Vector radius)
      Set a new radius for this ellipse.
      Parameters:
      radius - new radius
      Returns:
      this ellipse
    • getTilt

      public @Nullable Double getTilt()
      Get the tilt of this ellipse, in degrees.

      Defaults to '0' if null.

      Returns:
      tilt
    • setTilt

      public Ellipse setTilt(@Nullable Double tilt)
      Set the tilt of this ellipse, in degrees.

      Defaults to '0' if null.

      Parameters:
      tilt - new tilt
      Returns:
      this ellipse
    • toJson

      public com.google.gson.JsonObject toJson()
      Description copied from interface: JsonSerializable
      Jsonify this object.
      Returns:
      object as json element
    • fromJson

      public static Ellipse fromJson(com.google.gson.JsonObject obj)
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Keyed
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Keyed
    • toString

      public String toString()
      Overrides:
      toString in class Keyed