Absorbs an index cell by transferring its contents to edges and/or "tracker", and then delete this cell from the index. If edges includes any edges that are being removed, this method also updates their InteriorTracker state to correspond to the exit vertex of this cell.
Adds the given shape to the index and returns the assigned ID.
Adds the given faceEdge into the collection of all edges.
Clips all edges of the given shape to the six cube faces, adds the clipped edges to the set of allEdges, and starts tracking its interior if necessary.
Does the actual work of updating the index by applying all pending additions and removals. It does not update the indexes status.
Positions the iterator at the first cell in the index.
Triggers the update of the index. Calls to Add and Release are normally queued and processed on the first subsequent query. This has many advantages, the most important of which is that sometimes there is no subsequent query, which lets us avoid building the index completely.
This method forces any pending updates to be applied immediately.
Clips the given endpoint (lo=0, hi=1) of the u-axis so that it does not extend past the given value of the given edge.
Clips the given endpoint (lo=0, hi=1) of the v-axis so that it does not extend past the given value of the given edge.
Reports the number of distinct shapes that are either associated with the given edges, or that are currently stored in the InteriorTracker.
Positions the iterator at the last cell in the index.
Returns the id of the given shape in this index, or -1 if it is not in the index.
Reports if this is the first update to the index.
Reports if there are no pending updates that need to be applied. This can be useful to avoid building the index unnecessarily, or for choosing between two different algorithms depending on whether the index is available.
The returned index status may be slightly out of date if the index was built in a different thread. This is fine for the intended use (as an efficiency hint), but it should not be used by internal methods.
Reports if the shape with the given ID is currently slated for removal.
Returns an iterator for this index.
Reports the number of Shapes in this index.
Builds an indexCell from the given padded cell and set of edges and adds it to the index. If the cell or edges are empty, no cell is added.
Checks if the index pieces have changed, and if so, applies pending updates.
Returns the number of edges in this index.
Returns the number of edges in the given index, up to the given limit. If the limit is encountered, the current running total is returned, which may be more than the limit.
Returns a new ShapeIndexRegion for this ShapeIndex.
Removes the given shape from the index.
Does the actual work for removing a given shape from the index.
Resets the index to its original state.
Returns the shape with the given ID, or undefined if the shape has been removed from the index.
Skips over the cells in the given range, creating index cells if we are currently in the interior of at least one shape.
Calls the trackers testEdge on all edges from shapes that have interiors.
Updates the specified endpoint of the given clipped edge and returns the resulting clipped edge.
Adds or removes the given edges whose bounding boxes intersect a given cell. disjointFromIndex is an optimization hint indicating that cellMap does not contain any entries that overlap the given cell.
Adds or removes the various edges from the index. An edge is added if shapes[id] is not null, and removed otherwise.
Creates a new ShapeIndex.