fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
299 stars 58 forks source link

NAV world refactoring towards supporting SQLite databases. #175

Closed mjh65 closed 10 months ago

mjh65 commented 10 months ago

This is a further refactoring of the World NAV data API and implementation to create a baseline for future support for obtaining NAV data from a SQLite database.

It updates the way that NavNode connections are queried and implemented. Previously the NavNode object contained a vector of all NavEdges (connections) from that NavNode. This is suitable for a design where all NavNodes are held in memory, but in the SQLite implementation NavNodes will only be loaded when required. The connections from a NavNode have been moved into a separate container, and the API for querying these connections has been moved to the main World class API. There is virtually no difference in memory usage for the XData implementation.

A number of xdata-specific implementation functions have been removed from the World abstract API. These were overlooked in earlier refactoring PRs/

Region names are only set if the region does not already have a name.

fpw commented 10 months ago

Understood, good point.