Class Ellipse
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.geometry.AwtShapeCompatible
,it.unibo.alchemist.model.geometry.ConvexShape
,it.unibo.alchemist.model.geometry.Shape
,java.io.Serializable
public final class Ellipse implements ConvexShape<Euclidean2DPosition, Euclidean2DTransformation>, AwtShapeCompatible
Adapter of java.awt.geom.Ellipse2D to Euclidean2DConvexShape.
-
-
Method Summary
Modifier and Type Method Description Euclidean2DPosition
getCentroid()
Double
getDiameter()
Boolean
intersects(Shape<Euclidean2DPosition, Euclidean2DTransformation> other)
Boolean
contains(Euclidean2DPosition vector)
Shape<Euclidean2DPosition, Euclidean2DTransformation>
transformed(Function1<Euclidean2DTransformation, Unit> transformation)
Ellipse2D
asAwtShape()
-
-
Constructor Detail
-
Ellipse
Ellipse(Ellipse2D ellipse)
-
-
Method Detail
-
getCentroid
Euclidean2DPosition getCentroid()
-
getDiameter
Double getDiameter()
-
intersects
Boolean intersects(Shape<Euclidean2DPosition, Euclidean2DTransformation> other)
-
contains
Boolean contains(Euclidean2DPosition vector)
-
transformed
Shape<Euclidean2DPosition, Euclidean2DTransformation> transformed(Function1<Euclidean2DTransformation, Unit> transformation)
-
asAwtShape
Ellipse2D asAwtShape()
- Returns:
a copy of itself in form of a java.awt.Shape.
-
-
-
-