Class Ellipse

All Implemented Interfaces:
JsonSerializable

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

    • Ellipse

      public Ellipse(@NotNull @NotNull 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(@NotNull @NotNull String key, @NotNull @NotNull 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(@NotNull @NotNull String key, double centerX, double centerZ, @NotNull @NotNull Vector radius)
      Create a new ellipse.
      Parameters:
      key - identifying key
      centerX - center x location
      centerZ - center z location
      radius - radius
    • Ellipse

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

      public Ellipse(@NotNull @NotNull 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(@NotNull @NotNull String key, @NotNull @NotNull 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(@NotNull @NotNull String key, double centerX, double centerZ, @NotNull @NotNull 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(@NotNull @NotNull String key, @NotNull @NotNull Point center, @NotNull @NotNull Vector radius, double tilt)
      Create a new ellipse.
      Parameters:
      key - identifying key
      center - center location
      radius - radius
      tilt - tilt
  • Method Details

    • of

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull 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

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull String key, @NotNull @NotNull 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

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull String key, double centerX, double centerZ, @NotNull @NotNull 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

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

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull 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

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull String key, @NotNull @NotNull 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

      @NotNull public static @NotNull Ellipse of(@NotNull @NotNull String key, double centerX, double centerZ, @NotNull @NotNull 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

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

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

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

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

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

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

      Defaults to '0' if null.

      Returns:
      tilt
    • setTilt

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

      Defaults to '0' if null.

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

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

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

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

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

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Keyed