A specialized Map class that manages all edges used to restrict perception in a Scene. Integrates with a Quadtree for efficient spatial queries.

Hierarchy

  • Map
    • CanvasEdges

Methods

  • Parameters

    • key: any

    Returns boolean

  • Retrieves edges that intersect with a given rectangle. Utilizes the Quadtree for efficient spatial querying.

    Parameters

    • rect: Rectangle

      The rectangle to query against.

    • options: {
          collisionTest?: Function;
          includeInnerBounds?: boolean;
          includeOuterBounds?: boolean;
      } = {}
      • OptionalcollisionTest?: Function

        Collision function to test edge inclusion.

      • OptionalincludeInnerBounds?: boolean

        Should inner bounds be added?

      • OptionalincludeOuterBounds?: boolean

        Should outer bounds be added?

    Returns Set<Edge>

    A set of Edge instances that intersect with the provided rectangle.

  • Clear content and initializes the quadtree.

    Returns void

  • Incrementally refreshes edges by computing intersections between all registered edges. Utilizes the Quadtree to optimize the intersection detection process.

    Returns void