| 275 | } |
| 276 | |
| 277 | List<int> CelestialMasterDatabase::childOrbits(CelestialCoordinate const& coordinate) { |
| 278 | RecursiveMutexLocker locker(m_mutex); |
| 279 | |
| 280 | if (!coordinateValid(coordinate)) |
| 281 | throw CelestialException("CelestialMasterDatabase::childOrbits called on invalid coordinate"); |
| 282 | |
| 283 | auto const& systemObjects = getChunk(chunkIndexFor(coordinate)).systemObjects.get(coordinate.location()); |
| 284 | |
| 285 | if (coordinate.isSystem()) |
| 286 | return systemObjects.keys(); |
| 287 | |
| 288 | if (coordinate.isPlanetaryBody()) |
| 289 | return systemObjects.get(coordinate.orbitNumber()).satelliteParameters.keys(); |
| 290 | |
| 291 | throw CelestialException("CelestialMasterDatabase::childOrbits called on improper type!"); |
| 292 | } |
| 293 | |
| 294 | List<CelestialCoordinate> CelestialMasterDatabase::scanSystems(RectI const& region, Maybe<StringSet> const& includedTypes) { |
| 295 | RecursiveMutexLocker locker(m_mutex); |
no test coverage detected