| 234 | } |
| 235 | |
| 236 | void BridgeObject::DeassignSectors(const ItemInfo& item) const |
| 237 | { |
| 238 | // Deassign from sectors. |
| 239 | unsigned int searchDepth = (unsigned int)ceil(std::max({ _prevAabb.Extents.x, _prevAabb.Extents.y, _prevAabb.Extents.z }) / BLOCK(1)); |
| 240 | auto sectors = GetNeighborSectors(_prevTransform.Position, _prevRoomNumber, searchDepth); |
| 241 | for (auto* sector : sectors) |
| 242 | { |
| 243 | // Test if previous AABB intersects sector. |
| 244 | if (!_prevAabb.Intersects(sector->Aabb)) |
| 245 | continue; |
| 246 | |
| 247 | // Test if previous OBB intersects sector. |
| 248 | if (!_prevObb.Intersects(sector->Aabb)) |
| 249 | continue; |
| 250 | |
| 251 | sector->RemoveBridge(item.Index); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | const BridgeObject& GetBridgeObject(const ItemInfo& item) |
| 256 | { |
nothing calls this directly
no test coverage detected