CollisionObjectCollectionEnableLookupTable Property |
Namespace: DigitalRune.Geometry.Collisions
The Get(IGeometricObject) method can be used to look up a CollisionObject by specifying its IGeometricObject. By default the lookup is done by performing a linear search through all CollisionObjects, which is O(n). By setting EnableLookupTable to an internal lookup table is created to speedup the lookup at the cost of additional memory. The lookup using the internal lookup table is close to O(1).
The lookup table can be enabled or disabled at any time. (However, enabling the lookup table costs some time because all CollisionObjects need to be copied into the lookup table.)