BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Class BimCTClippingRegions

    Class managing clipping regions.

    Index

    Constructors

    Accessors

    Methods

    • Add a new clipping region.

      Parameters

      • rectangle: Rectangle

      Returns Promise<ClippingRegion>

      null if the rectangle overlaps with another region or the newly added region

    • Remove a region by its BimCTClippingRegion reference.

      Parameters

      Returns Promise<boolean>

    • Remove a region by its index in the _regions array.

      Parameters

      • index: number

      Returns Promise<void>

    • Get a region by its index in the _regions array.

      Parameters

      • index: number

      Returns ClippingRegion

    • Clear all regions.

      Returns Promise<void>

    • Sets a line with length as a global scale visible

      Parameters

      Returns void

    • Clears the global scale line.

      Returns void

    • Redraws the clipping regions.

      Returns Promise<void>

    • Checks if a Measurement is contained within a region

      Parameters

      Returns Promise<boolean>

    • Destroys the clipping region manager by clearing all regions, removing the canvas from the DOM, and releasing resources.

      Returns void

    • Resizes the canvas to the specified dimensions and redraws all clipping regions.

      Parameters

      • width: number

        The new width of the canvas in pixels.

      • height: number

        The new height of the canvas in pixels.

      Returns Promise<void>

    • Highlights the region and brings it forward

      Parameters

      • x: number

        The x-coordinate of the point.

      • y: number

        The y-coordinate of the point.

      Returns void

    • Brings the specified region to the front by drawing it last.

      Parameters

      Returns void

    • Gets the clipping region of a measurement.

      Parameters

      Returns Promise<ClippingRegion>

      The clipping region or null if not found.

    • Check if a point is inside any clipping region.

      Parameters

      • x: number

        The x-coordinate of the point.

      • y: number

        The y-coordinate of the point.

      Returns boolean

      true if no region exist or if this point lies inside a region otherwise false

    • Get the clipping region that is behind a point

      Parameters

      • x: number

        The x-coordinate of the point.

      • y: number

        The y-coordinate of the point.

      Returns ClippingRegion

      The BimCTClippingRegion containing the point, or null if no region contains the point.

    • Parameters

      • x: number
      • y: number
      • x1: number
      • y1: number

      Returns ClippingRegion