RectangleD

data class RectangleD(val x: Double, val y: Double, val width: Double, val height: Double) : Shape2D, IsAlmostEquals<RectangleD>

Constructors

Link copied to clipboard
constructor(x: Double, y: Double, width: Double, height: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val area: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val center: Point
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val closed: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val perimeter: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Size
Link copied to clipboard
val top: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val x: Double
Link copied to clipboard
val xD: Double
Link copied to clipboard
val y: Double
Link copied to clipboard
val yD: Double

Functions

Link copied to clipboard
fun Rectangle.applyScaleMode(container: Rectangle, mode: ScaleMode, anchor: Anchor): Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun contains(that: Point): Boolean
operator fun contains(that: Vector2F): Boolean
operator fun contains(that: Vector2I): Boolean
fun contains(x: Int, y: Int): Boolean
Link copied to clipboard
open override fun containsPoint(p: Point): Boolean

open fun containsPoint(ml: Matrix, p: Point, mr: Matrix): Boolean

ml transformation matrix of this Shape2D, mr transformation matrix of the point p

Link copied to clipboard
fun copyBounds(left: Double = this.left, top: Double = this.top, right: Double = this.right, bottom: Double = this.bottom): Rectangle
Link copied to clipboard
fun Rectangle.copyTo(out: MRectangle = MRectangle()): MRectangle
Link copied to clipboard
open override fun distance(p: Point): Double

Compute the distance to the shortest point to the edge (SDF). Negative inside. Positive outside.

open fun distance(ml: Matrix, p: Point, mr: Matrix): Double

ml transformation matrix of this Shape2D, mr transformation matrix of the point p

Link copied to clipboard
operator fun div(scale: Double): Rectangle
operator fun div(scale: Float): Rectangle
operator fun div(scale: Int): Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getBounds(): Rectangle
Link copied to clipboard
infix fun intersection(that: Rectangle): Rectangle
Link copied to clipboard
Link copied to clipboard

open fun intersectionsWith(ml: Matrix, that: Shape2D, mr: Matrix): PointList

ml transformation matrix of this Shape2D, mr transformation matrix of the shape that

Link copied to clipboard
infix fun intersects(that: Rectangle): Boolean
Link copied to clipboard
open fun intersectsWith(that: Shape2D): Boolean
open fun intersectsWith(ml: Matrix, that: Shape2D, mr: Matrix): Boolean
Link copied to clipboard
infix fun intersectsX(that: Rectangle): Boolean
Link copied to clipboard
infix fun intersectsY(that: Rectangle): Boolean
Link copied to clipboard
open override fun isAlmostEquals(other: Rectangle, epsilon: Double): Boolean
Link copied to clipboard
fun Rectangle.mutable(out: MRectangle = MRectangle()): MRectangle
Link copied to clipboard
Link copied to clipboard
open override fun normalVectorAt(p: Point): Vector2D

Returns the normal vector to the shortest point to the edge

open fun normalVectorAt(ml: Matrix, p: Point, mr: Matrix): Point

ml transformation matrix of this Shape2D, mr transformation matrix of the point p

Link copied to clipboard

Circle that touches or contains all the corners (topLeft, topRight, bottomLeft, bottomRight) of the rectangle.

Link copied to clipboard
fun Rectangle.place(item: Size, anchor: Anchor, scale: ScaleMode): Rectangle
Link copied to clipboard
open override fun projectedPoint(p: Point): Point

Point projected to the closest edge

open fun projectedPoint(ml: Matrix, p: Point, mr: Matrix): Point

ml transformation matrix of this Shape2D, mr transformation matrix of the point p

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun times(scale: Double): Rectangle
operator fun times(scale: Float): Rectangle
operator fun times(scale: Int): Rectangle
Link copied to clipboard
fun Rectangle.toAwt(out: Rectangle2D.Float = Rectangle2D.Float()): Rectangle2D.Float
Link copied to clipboard
fun Rectangle.toBVH(out: BVHIntervals = BVHIntervals(2)): BVHRect
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun toMRectangle(out: MRectangle = MRectangle()): MRectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toVectorPath(): VectorPath
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun with(margin: Margin): Rectangle
Link copied to clipboard
fun without(padding: Margin): Rectangle