AbstractConvexPolygon

An abstract ConvexPolygon providing a convexity test.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
abstract val diameter: Double
Link copied to clipboard
open val radius: Double

Functions

Link copied to clipboard
abstract fun asAwtShape(): Shape
Link copied to clipboard

Finds the edge of the polygon closest to the provided segment, i.e. the first one that would collide (= intersect) with the segment in case the polygon extended on each side.

Link copied to clipboard
open override fun contains(shape: Shape): Boolean

Checks if the polygon contains a polygonal java.awt.Shape (i.e. without curved segments). A polygonal shape is contained in a polygon if all of its points are contained in (or lie on the boundary of) the latter.

abstract override fun contains(vector: Euclidean2DPosition): Boolean

Checks if the polygon contains a vector (= a point). The definition of insideness may vary depending on the implementation, this may affect the outcome for points lying on the polygon's boundary. For accurate operations see containsBoundaryIncluded and containsBoundaryExcluded.

Link copied to clipboard

Checks if a vector (= a point) is contained in the polygon, boundary excluded.

Link copied to clipboard

Checks if a vector (= a point) is contained in the polygon or lies on its boundary.

Link copied to clipboard
Link copied to clipboard
abstract fun getEdge(index: Int): Segment2D<Euclidean2DPosition>

Depending on the implementation, this may be faster than edges.get(index).

Link copied to clipboard
open override fun intersects(segment: Segment2D<Euclidean2DPosition>): Boolean

Checks if a segment intersects with the polygon, segments lying on the polygon's boundary are not considered to be intersecting.

abstract fun intersects(shape: Shape): Boolean

Checks if a java.awt.Shape intersects the polygon, adjacent shapes are not considered to be intersecting.

Link copied to clipboard
open override fun isAdjacentTo(other: ConvexPolygon): Boolean

A polygon is adjacent to another if any of its points lies on the boundary of the other.

Link copied to clipboard
open override fun liesOnBoundary(vector: Euclidean2DPosition): Boolean

Checks if a vector (= a point) lies on the polygon's boundary.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard