GriddedRaggedRange2dSet<T> Class

A GriddedRaggedRange2dSet is:

  • A doubly dimensioned array of Range2dSearchInterface.
  • Each entry represents a block in a uniform grid within the master range.
  • Member ranges are noted in the grid block containing the range's lower left corner.
  • Member ranges larger than twice the grid size are rejected by the insert method.
  • Hence a search involving a point in grid block (i,j) must examine ranges in grid blocks left and below, i.e. (i-1,j-1), (i-1,j), (i,j-1)

Implements

Methods

Name Description
addRange(range: Readonly<WritableLowAndHighXY>, tag: T): void Add a range to the search set.  
conditionalInsert(range: Readonly<WritableLowAndHighXY> | Range3d | Range2d, tag: T): boolean If possible, insert a range into the set.  
searchRange2d(testRange: Readonly<WritableLowAndHighXY>, handler: (range: Range2d, tag: T) => boolean): boolean * Search for ranges overlapping testRange  
searchXY(x: number, y: number, handler: (range: Range2d, tag: T) => boolean): boolean * Search for ranges containing testRange  
totalRange(result?: Range2d): Range2d Return the overall range of all members.  
visitChildren(initialDepth: number, handler: (depth: number, child: Range2dSearchInterface<T>) => void): void Call the handler on each defined block in the grid.  
create<T>(range: Range2d, numXEdge: number, numYEdge: number): undefined | GriddedRaggedRange2dSet<T> Static Create an (empty) set of ranges.  

Defined in

Last Updated: 17 December, 2024