Package net.pl3x.map.core.markers.marker
Class Ellipse
- All Implemented Interfaces:
JsonSerializable
Represents an ellipse marker.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new ellipse.Ellipse(@NotNull String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt) Create a new ellipse.Create a new ellipse.Create a new ellipse.Create a new ellipse.Create a new ellipse.Create a new ellipse.Create a new ellipse. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @NotNull EllipsefromJson(@NotNull com.google.gson.JsonObject obj) @NotNull PointGet the centerPointof this ellipse.@NotNull VectorGet the radius for this ellipse.@Nullable DoublegetTilt()Get the tilt of this ellipse, in degrees.inthashCode()static @NotNull EllipseCreate a new ellipse.static @NotNull Ellipseof(@NotNull String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt) Create a new ellipse.static @NotNull EllipseCreate a new ellipse.static @NotNull EllipseCreate a new ellipse.static @NotNull EllipseCreate a new ellipse.static @NotNull EllipseCreate a new ellipse.static @NotNull EllipseCreate a new ellipse.static @NotNull EllipseCreate a new ellipse.@NotNull EllipseSet a new centerPointfor this ellipse.@NotNull EllipseSet a new radius for this ellipse.@NotNull EllipseSet the tilt of this ellipse, in degrees.@NotNull com.google.gson.JsonObjecttoJson()Jsonify this object.@NotNull StringtoString()Methods inherited from class net.pl3x.map.core.markers.marker.Marker
circle, circle, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, getOptions, getPane, getType, icon, icon, icon, icon, icon, icon, icon, multiPolygon, multiPolygon, multiPolygon, multiPolyline, multiPolyline, multiPolyline, polygon, polygon, polygon, polyline, polyline, polyline, rectangle, rectangle, setOptions, setOptions, setPane
-
Constructor Details
-
Ellipse
public Ellipse(@NotNull @NotNull String key, double centerX, double centerZ, double radiusX, double radiusZ) Create a new ellipse.- Parameters:
key- identifying keycenterX- center x locationcenterZ- center z locationradiusX- x radiusradiusZ- z radius
-
Ellipse
public Ellipse(@NotNull @NotNull String key, @NotNull @NotNull Point center, double radiusX, double radiusZ) Create a new ellipse.- Parameters:
key- identifying keycenter- center locationradiusX- x radiusradiusZ- z radius
-
Ellipse
public Ellipse(@NotNull @NotNull String key, double centerX, double centerZ, @NotNull @NotNull Vector radius) Create a new ellipse.- Parameters:
key- identifying keycenterX- center x locationcenterZ- center z locationradius- radius
-
Ellipse
public Ellipse(@NotNull @NotNull String key, @NotNull @NotNull Point center, @NotNull @NotNull Vector radius) Create a new ellipse.- Parameters:
key- identifying keycenter- center locationradius- 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 keycenterX- center x locationcenterZ- center z locationradiusX- x radiusradiusZ- z radiustilt- 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 keycenter- center locationradiusX- x radiusradiusZ- z radiustilt- 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 keycenterX- center x locationcenterZ- center z locationradius- radiustilt- 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 keycenter- center locationradius- radiustilt- 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 keycenterX- center x locationcenterZ- center z locationradiusX- x radiusradiusZ- 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 keycenter- center locationradiusX- x radiusradiusZ- 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 keycenterX- center x locationcenterZ- center z locationradius- 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 keycenter- center locationradius- 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 keycenterX- center x locationcenterZ- center z locationradiusX- x radiusradiusZ- z radiustilt- 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 keycenter- center locationradiusX- x radiusradiusZ- z radiustilt- 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 keycenterX- center x locationcenterZ- center z locationradius- radiustilt- 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 keycenter- center locationradius- radiustilt- tilt- Returns:
- a new ellipse
-
getCenter
Get the centerPointof this ellipse.- Returns:
- center point
-
setCenter
Set a new centerPointfor this ellipse.- Parameters:
center- new center- Returns:
- this ellipse
-
getRadius
Get the radius for this ellipse.- Returns:
- radius
-
setRadius
Set a new radius for this ellipse.- Parameters:
radius- new radius- Returns:
- this ellipse
-
getTilt
Get the tilt of this ellipse, in degrees.Defaults to '
0' if null.- Returns:
- tilt
-
setTilt
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:JsonSerializableJsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-