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(p: Double, p1: 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(p: 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
Link copied to clipboard
open fun intersects(p: Double, p1: Double, p2: Double, p3: Double): Boolean
Link copied to clipboard
open fun intersectsLine(p: Double, p1: Double, p2: Double, p3: 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(p: Double, p1: Double): Int
Link copied to clipboard
open fun setFrame(p: Double, p1: Double, p2: Double, p3: Double)
Link copied to clipboard
open fun setFrameFromCenter(p: Double, p1: Double, p2: Double, p3: Double)
Link copied to clipboard
open fun setFrameFromDiagonal(p: Double, p1: Double, p2: Double, p3: Double)
Link copied to clipboard
open fun setRect(p: Double, p1: Double, p2: Double, p3: Double)
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun union(p: Rectangle2D, p1: Rectangle2D, p2: 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.