Package net.pl3x.map.core.markers.marker
Class Ellipse
- All Implemented Interfaces:
JsonSerializable
Represents an ellipse marker.
-
Constructor Summary
ConstructorDescriptionCreate 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 TypeMethodDescriptionboolean
static @NotNull Ellipse
fromJson
(@NotNull com.google.gson.JsonObject obj) @NotNull Point
Get the centerPoint
of this ellipse.@NotNull Vector
Get the radius for this ellipse.@Nullable Double
getTilt()
Get the tilt of this ellipse, in degrees.int
hashCode()
static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
of
(@NotNull String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt) Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.static @NotNull Ellipse
Create a new ellipse.@NotNull Ellipse
Set a new centerPoint
for this ellipse.@NotNull Ellipse
Set a new radius for this ellipse.@NotNull Ellipse
Set the tilt of this ellipse, in degrees.@NotNull com.google.gson.JsonObject
toJson()
Jsonify this object.@NotNull String
toString()
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 centerPoint
of this ellipse.- Returns:
- center point
-
setCenter
Set a new centerPoint
for 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:JsonSerializable
Jsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-