Ellipse

data class Ellipse(val center: Point, val radius: Size) : Shape2D

Constructors

Link copied to clipboard
constructor(center: Point, radius: Size)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val area: Double
Link copied to clipboard
open override val center: Point
Link copied to clipboard
open val closed: Boolean
Link copied to clipboard
open override val perimeter: Double
Link copied to clipboard

Functions

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
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
open fun getBounds(): Rectangle
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
open fun intersectsWith(that: Shape2D): Boolean
open fun intersectsWith(ml: Matrix, that: Shape2D, mr: Matrix): Boolean
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
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
open override fun toVectorPath(): VectorPath