Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScreenCollisions

Hierarchy

  • ScreenCollisions

Index

Constructors

constructor

Properties

Readonly screenBounds

screenBounds: Box = new Math2D.Box()

The screen bounding box.

Methods

allocate

allocateIBoxes

  • allocateIBoxes(bounds: IBox[]): void
  • Inserts the given bounds into the rtree.

    Parameters

    • bounds: IBox[]

      The bounding boxes (the bounding boxes must be in the space returned from the ScreenProjector.project method).

    Returns void

intersectsDetails

  • Test whether a given CollisionBox intersects with any of the details in the specified IBoxes.

    Parameters

    • testBox: CollisionBox

      The box to test for intersection.

    • boxes: IBox[]

      The candidate boxes the test box may intersect with. It's assumed that the global bounds of these boxes intersect with the given test box.

    Returns boolean

    true if any intersection found.

isAllocated

isFullyVisible

  • isFullyVisible(bounds: Box): boolean

isVisible

  • isVisible(bounds: Box): boolean

reset

  • reset(): void

search

update

  • update(width: number, height: number): void
  • Updates the screen bounds that are used to check if bounding boxes are visible.

    Parameters

    • width: number

      The width of the container.

    • height: number

      The height of the container.

    Returns void

Generated using TypeDoc