Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

  • new R2Segment(x0: number, y0: number, x1: number, y1: number): R2Segment
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns R2Segment

Properties

Readonly x0

x0: number

Readonly x1

x1: number

Readonly y0

y0: number

Readonly y1

y1: number

Accessors

bounds

  • Returns R2Box

xMax

  • get xMax(): number
  • Returns number

xMin

  • get xMin(): number
  • Returns number

yMax

  • get yMax(): number
  • Returns number

yMin

  • get yMin(): number
  • Returns number

Methods

contains

  • contains(that: AnyR2Shape): boolean
  • contains(x: number, y: number): boolean
  • Parameters

    Returns boolean

  • Parameters

    • x: number
    • y: number

    Returns boolean

containsPoint

  • containsPoint(that: R2Point): boolean
  • Parameters

    Returns boolean

containsSegment

  • Parameters

    Returns boolean

debug

  • debug(output: Output<unknown>): void
  • Parameters

    Returns void

draw

  • Parameters

    Returns void

drawMove

drawRest

equals

  • equals(that: unknown): boolean
  • Parameters

    • that: unknown

    Returns boolean

equivalentTo

  • equivalentTo(that: unknown, epsilon?: number): boolean
  • Parameters

    • that: unknown
    • Optional epsilon: number

    Returns boolean

hashCode

  • hashCode(): number
  • Returns number

interpolate

interpolateTo

  • Parameters

    Returns Interpolator<R2Segment>

  • Parameters

    • that: unknown

    Returns null | Interpolator<R2Segment>

interpolateX

  • interpolateX(u: number): number
  • Parameters

    • u: number

    Returns number

interpolateY

  • interpolateY(u: number): number
  • Parameters

    • u: number

    Returns number

intersects

intersectsPoint

  • intersectsPoint(that: R2Point): boolean
  • Parameters

    Returns boolean

intersectsSegment

  • intersectsSegment(that: R2Segment): boolean
  • Parameters

    Returns boolean

isDefined

  • isDefined(): boolean
  • Returns boolean

split

toAny

  • Returns R2SegmentInit

toPathString

toString

  • toString(): string
  • Returns string

transform

transformDraw

transformDrawMove

transformDrawRest

union

writeMove

  • writeMove(output: Output<unknown>): void
  • Parameters

    Returns void

writePath

  • writePath(output: Output<unknown>): void
  • Parameters

    Returns void

writeRest

  • writeRest(output: Output<unknown>): void
  • Parameters

    Returns void

Static contains

  • contains(ax: number, ay: number, bx: number, by: number, cx: number, cy: number): boolean
  • Parameters

    • ax: number
    • ay: number
    • bx: number
    • by: number
    • cx: number
    • cy: number

    Returns boolean

Static cubic

  • cubic(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): R2Curve
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • x3: number
    • y3: number

    Returns R2Curve

Static elliptic

  • elliptic(cx: number, cy: number, rx: number, ry: number, phi: number, a0: number, da: number): R2Curve
  • Parameters

    • cx: number
    • cy: number
    • rx: number
    • ry: number
    • phi: number
    • a0: number
    • da: number

    Returns R2Curve

Static fromAny

Static fromInit

  • Parameters

    Returns R2Segment

Static intersects

  • intersects(px: number, py: number, rx: number, ry: number, qx: number, qy: number, sx: number, sy: number): boolean
  • Parameters

    • px: number
    • py: number
    • rx: number
    • ry: number
    • qx: number
    • qy: number
    • sx: number
    • sy: number

    Returns boolean

Static isAny

  • Parameters

    • value: unknown

    Returns value is AnyR2Segment

Static isInit

  • Parameters

    • value: unknown

    Returns value is R2SegmentInit

Static linear

  • linear(x0: number, y0: number, x1: number, y1: number): R2Curve
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns R2Curve

Static of

  • of(x0: number, y0: number, x1: number, y1: number): R2Segment
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns R2Segment

Static parse

  • Parameters

    • string: string

    Returns R2Curve

Static quadratic

  • quadratic(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): R2Curve
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns R2Curve

Generated using TypeDoc