Options
All
  • Public
  • Public/Protected
  • All
Menu

Polygon collision area for detecting collisions for actors, or independently

Hierarchy

  • PolygonArea

Implements

Index

Constructors

constructor

Properties

body

body: Body

points

points: Vector[]

pos

pos: Vector

Methods

collide

contains

  • contains(point: Vector): boolean

debugDraw

  • debugDraw(ctx: CanvasRenderingContext2D, color?: Color): void

getAxes

getBounds

getCenter

getClosestFace

  • getClosestFace(point: Vector): object

getFurthestPoint

getMomentOfInertia

  • getMomentOfInertia(): number

getSides

  • getSides(): Line[]

getTransformedPoints

  • getTransformedPoints(): Vector[]

project

rayCast

recalc

  • recalc(): void

testSeparatingAxisTheorem