Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

A simple circle: center point and radius.

requires

Line

requires

Vector

requires

VertTuple

requires

Vertex

requires

SVGSerializale

requires

UID

requires

UIDGenerator

Hierarchy

  • Circle

Implements

Index

Constructors

constructor

  • Create a new circle with given center point and radius.

    name

    Circle

    Parameters

    • center: Vertex

      The center point of the circle.

    • radius: number

      The radius of the circle.

    Returns Circle

Properties

center

center: Vertex
member

{Vertex}

memberof

Circle

instance

Readonly className

className: string = "Circle"

Required to generate proper CSS classes and other class related IDs.

isDestroyed

isDestroyed: boolean
member

isDestroyed

memberof

CubicBezierCurve

instance

radius

radius: number
member

{number}

memberof

Circle

instance

Readonly uid

uid: UID

The UID of this drawable object.

member

{UID}

memberof

Circle

instance
readonly

Methods

circleIntersection

  • Calculate the intersection points (if exists) with the given circle.

    method

    circleIntersection

    instance
    memberof

    Circle

    Parameters

    Returns Line | null

    The intersection points (as a line) or null if the two circles do not intersect.

closestPoint

  • Calculate the closest point on the outline of this circle to the given point.

    method

    closestPoint

    instance
    memberof

    Circle

    Parameters

    • vert: XYCoords

      The point to find the closest circle point for.

    Returns Vertex

    The closest point on this circle.

containsCircle

  • containsCircle(circle: Circle): boolean
  • Check if the given circle is fully contained inside this circle.

    method

    containsCircle

    instance
    memberof

    Circle

    Parameters

    • circle: Circle

      The circle to check if it is contained in this circle.

    Returns boolean

    true if any only if the given circle is completely inside this circle.

containsPoint

  • containsPoint(point: XYCoords): boolean
  • Check if the given circle is fully contained inside this circle.

    method

    containsPoint

    instance
    memberof

    Circle

    Parameters

    • point: XYCoords

      The point to check if it is contained in this circle.

    Returns boolean

    true if the given point is inside this circle.

destroy

  • destroy(): void
  • This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used.

    Returns void

lineDistance

  • Calculate the distance from this circle to the given line.

    • If the line does not intersect this ciecle then the returned value will be the minimal distance.
    • If the line goes through this circle then the returned value will be max inner distance and it will be negative.
    method

    lineDistance

    instance
    memberof

    Circle

    Parameters

    • line: VertTuple<any>

      The line to measure the distance to.

    Returns number

    The minimal distance from the outline of this circle to the given line.

lineIntersection

  • Calculate the intersection points (if exists) with the given infinite line (defined by two points).

    method

    lineIntersection

    instance
    memberof

    Circle

    Parameters

    • a: Vertex
    • b: XYCoords

      The second of the two points defining the line.

    Returns Line | null

    The intersection points (as a line) or null if this circle does not intersect the line given.

tangentAt

  • tangentAt(angle: number): Vector
  • Get a tangent line of this circle for a given angle.

    Point a of the returned line is located on the circle, the length equals the radius.

    method

    tangentAt

    instance
    memberof

    Circle

    Parameters

    • angle: number

      The angle (in radians) to use.

    Returns Vector

    The tangent line.

vertAt

  • vertAt(angle: number): Vertex
  • Get the vertex on the this circle for the given angle.

    method

    vertAt

    instance
    memberof

    Circle

    Parameters

    • angle: number

      The angle (in radians) to use.

    Returns Vertex

    The vertex (point) at the given angle.

Object literals

Static circleUtils

circleUtils: object

vertAt

  • vertAt(angle: number, radius: number): Vertex

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc