-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Obstacle,it.unibo.alchemist.model.interfaces.Obstacle2D,java.awt.Shape,java.io.Serializable,java.lang.Cloneable
public final class RectObstacle2D<V extends Vector2D<V>> extends Rectangle2D.Double implements Obstacle2D<V>
This class implements a rectangular obstacle, whose sides are parallel to the cartesian axis.
-
-
Constructor Summary
Constructors Constructor Description RectObstacle2D(double x, double y, double w, double h)Builds a new RectObstacle2D, given a point, the width and the height.
-
Method Summary
Modifier and Type Method Description intgetId()doublegetMinX()doublegetMaxX()doublegetMinY()doublegetMaxY()Vnext(@Nonnull() V start, @Nonnull() V end)VnearestIntersection(V start, V end)booleancontains(double x, double y)StringtoString()-
Methods inherited from class java.awt.geom.Rectangle2D.Double
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect -
Methods inherited from class java.awt.geom.Rectangle2D
add, equals, getPathIterator, hashCode, intersect, intersects, intersectsLine, setFrame, union -
Methods inherited from class java.awt.geom.RectangularShape
clone, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, setFrameFromCenter, setFrameFromDiagonal -
Methods inherited from class it.unibo.alchemist.model.interfaces.Obstacle
getId -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-