openrndr / org.openrndr.shape / LineSegment

LineSegment

data class LineSegment (source)

Constructors

<init>

LineSegment(x0: Double, y0: Double, x1: Double, y1: Double)
LineSegment(start: Vector2, end: Vector2)

Properties

contour

val contour: ShapeContour

direction

val direction: Vector2

end

val end: Vector2

normal

val normal: Vector2

shape

val shape: Shape

start

val start: Vector2

Functions

distance

fun distance(query: Vector2): Double

endingAtNearest

fun endingAtNearest(x: Double, y: Double): LineSegment

endingAtX

fun endingAtX(x: Double): LineSegment

endingAtY

fun endingAtY(y: Double): LineSegment

nearest

fun nearest(query: Vector2): Vector2

position

fun position(t: Double): Vector2

rotate

fun rotate(theta: Double, t: Double = 0.5): LineSegment

split

fun split(t: Double): Array<LineSegment>

startingAtX

fun startingAtX(x: Double): LineSegment

startingAtY

fun startingAtY(y: Double): LineSegment

sub

fun sub(t0: Double, t1: Double): LineSegment