RectObstacle2D

This class implements a rectangular obstacle, whose sides are parallel to the cartesian axis.

Parameters

<V>

Constructors

Link copied to clipboard
constructor(x: Double, y: Double, w: Double, h: Double)
Builds a new RectObstacle2D, given a point, the width and the height.

Properties

Link copied to clipboard
open var height: Double
Link copied to clipboard
val id: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val OUT_BOTTOM: Int = 8
Link copied to clipboard
val OUT_LEFT: Int = 1
Link copied to clipboard
val OUT_RIGHT: Int = 4
Link copied to clipboard
val OUT_TOP: Int = 2
Link copied to clipboard
open var width: Double
Link copied to clipboard
open var x: Double
Link copied to clipboard
open var y: Double

Functions

Link copied to clipboard
open fun add(newx: Double, newy: Double)
Link copied to clipboard
open fun clone(): Any
Link copied to clipboard
open fun contains(x: Double, y: Double): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getBounds(): Rectangle
Link copied to clipboard
Link copied to clipboard
open fun getCenterX(): Double
Link copied to clipboard
open fun getCenterY(): Double
Link copied to clipboard
open fun getFrame(): Rectangle2D
Link copied to clipboard
open fun getHeight(): Double
Link copied to clipboard
abstract fun getId(): Int
Link copied to clipboard
open fun getMaxX(): Double
Link copied to clipboard
open fun getMaxY(): Double
Link copied to clipboard
open fun getMinX(): Double
Link copied to clipboard
open fun getMinY(): Double
Link copied to clipboard
Link copied to clipboard
open fun getWidth(): Double
Link copied to clipboard
open fun getX(): Double
Link copied to clipboard
open fun getY(): Double
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun intersect(src1: Rectangle2D, src2: Rectangle2D, dest: Rectangle2D)
Link copied to clipboard
open fun intersects(x: Double, y: Double, w: Double, h: Double): Boolean
Link copied to clipboard
open fun intersectsLine(x1: Double, y1: Double, x2: Double, y2: Double): Boolean
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
@Nonnull
open fun nearestIntersection(start: V, end: V): V
Link copied to clipboard
@Nonnull
open fun next(@Nonnull start: V, @Nonnull end: V): V
Link copied to clipboard
open fun outcode(x: Double, y: Double): Int
Link copied to clipboard
open fun setFrame(x: Double, y: Double, w: Double, h: Double)
Link copied to clipboard
open fun setFrameFromCenter(centerX: Double, centerY: Double, cornerX: Double, cornerY: Double)
Link copied to clipboard
open fun setFrameFromDiagonal(x1: Double, y1: Double, x2: Double, y2: Double)
Link copied to clipboard
open fun setRect(x: Double, y: Double, w: Double, h: Double)
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun union(src1: Rectangle2D, src2: Rectangle2D, dest: Rectangle2D)
Link copied to clipboard

Obtains the vertices of a polygonal shape. Any curved segment connecting two points will be considered as a straight line between them.