0

I need 3D AABB(axis aligned bounding box) as key in map. The main concern is, there must not be pair of AABB keys in map which somehow intersect each other. I don't know which structure/container should i use.

Any suggestions?

BlackCat
  • 329
  • 5
  • 17

1 Answers1

1

You need a spatially sorted data structure, rather than a "map".

I can't think of a standard data-structure for storing non-overlapping boxes, but you could achieve what you're trying to do by storing the four defining points of your bounding box in an octree, and checking on insertion that the volume of the inserted box is empty.

James
  • 24,676
  • 13
  • 84
  • 130