Data structure for efficient intersection and distance queries over sets of 2D and 3D geometric primitives.