Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Circle

Hierarchy

  • Circle

Implements

Index

Constructors

constructor

  • new Circle(_x?: number, _y?: number, _radius?: number, _angle?: number): Circle
  • Creates a new Circle

    Parameters

    • Default value _x: number = 0

      Abscissa of center

    • Default value _y: number = 0

      Ordinate of center

    • Default value _radius: number = 0

      Radius of circle

    • Default value _angle: number = 0

      Rotation

    Returns Circle

Properties

Private _angle

_angle: number

Rotation

Private _radius

_radius: number

Radius of circle

Private _x

_x: number

Abscissa of center

Private _y

_y: number

Ordinate of center

Accessors

angle

  • get angle(): number

radius

  • get radius(): number

x

  • get x(): number

y

  • get y(): number

Methods

clone

collides

  • collides(shape: Shape<any>): boolean
  • Checks if Circle collides another shape

    Parameters

    • shape: Shape<any>

      Shape to check

    Returns boolean

    true only if provided shape collides current Circle

contains

  • contains(p: Point): boolean
  • contains(coordX: number, coordY: number): boolean

move

moveTo

reset

  • reset(newX: number, newY: number, newRadius: number, newAngle?: number): Circle
  • Resets Circle dimensions

    Parameters

    • newX: number

      New abscissa of center

    • newY: number

      New ordinate of center

    • newRadius: number
    • Default value newAngle: number = 0

      New rotation

    Returns Circle

    Current Circle

rotate

  • rotate(angle: number): Circle

rotateRad

  • rotateRad(angle: number): Circle

scale

  • scale(newRadius: number): Circle

Generated using TypeDoc