Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of a layer-based system #236

Open
MathiasBaumgartinger opened this issue Jul 18, 2020 · 6 comments
Open

Documentation of a layer-based system #236

MathiasBaumgartinger opened this issue Jul 18, 2020 · 6 comments
Assignees
Labels
documentation Works, but needs to be documented

Comments

@MathiasBaumgartinger
Copy link
Contributor

MathiasBaumgartinger commented Jul 18, 2020

As mentioned in #235, we will restructure the the whole node-tree. In more detail, the new structure should have a layer-based system. A LayerContainer which will handle every additional geo-information. This can for instance be raster-data, such as vegetation (grass, trees, ...) but also vector-data, such as assets (existing wind-turbines).

Layers should also be able to be grouped (sublayers), for example there will be different street sublayers grouped in one street-layer. Layers will be instanced by a WorldConfigurator according to information from the configuration node (at issue #230). A layer's sole purpose will be display of geodata. It will access the geodata via a global distributor of geodata.

A general idea was to have super-class Layer and then distinguish between an ObjectLayer and an AreaLayer.

grafik

@MathiasBaumgartinger
Copy link
Contributor Author

MathiasBaumgartinger commented Aug 4, 2020

Further discussed resulted in following structure:

  • World
    • WorldConfigurator : Configurator
    • BaseTiles
      • Modules
        • Collider <-> Layer1
        • HeightmapTerrain <-> Layer1, Layer2
    • LayerRenderers : Configurator
      • Layer3Renderer <-> Layer3
  • UI
    • UIConfigurator
    • ...
      • LayerListUI
        • Layer1UIView <-> Layer1
  • Layers
    • LayerConfigurator
    • Layer1
    • Layer2
    • Layer3
    • ...
  • Game Engine
    • ...
      • ScoreXY -> Layer1, Layer2

This will also be relevant for #237 and #235.

@MathiasBaumgartinger
Copy link
Contributor Author

MathiasBaumgartinger commented Aug 4, 2020

Classes are described as follows (in German):

Configurator (Superclass):

Layers (Singleton):

  • Bietet Zugriff auf die einzelnen Layer Controller von überall
  • Bietet verschiedene Signale für jeweilige andere Configurationsstellen

LayerConfigurator:

  • Ladet ein Layer für jedes GeoLayer im GeoDataset beim Startup
  • Weißt die Richtung Attribute/Modelle/etc. zu

Layer:

  • Implementation ist zuständig für das Caching, kann beliebige eigene Logik schreiben: z.b. wenn verbunden mit mehreren Views und nicht positionsspezifischer Datensatz -> cachen, ansonsten nicht (wenn kein caching nötig ist kanns auch ganz weggelassen werden)
  • Hat ein GeoLayer
  • Bietet Daten aus GeoLayer in LandscapeLab-spezifischer Form und kümmert sich um etwaige Logik (z.b. ob Platzierung erlaubt ist)

GeoLayer:

  • Bietet Daten aus Geodatensätzen in Godot-spezifischer Form (über GDAL)

LayerRenderers : Configurator:

  • Eine Art Container, die sich um die erstmalige Instanzierung aller Layer kümmert (Configurator)
  • Reagiert auf verschiedene Signale, wie beispielsweise new RenderedLayer

LayerRenderer:

  • Kümmert sich um die graphische Darstellung innerhalb der Welt
  • Ist nach der ersten Instanzierung direkt mit dem Layer verbunden und reagiert auf dessen Änderungen, etc.

LayerUI : Configurator:

  • Eine Art Container, die sich um die erstmalige Instanzierung aller Layer kümmert (Configurator)
  • Reagiert auf verschiedene Signale, wie beispielsweise new UILayer
  • Kann bestehende Layer innerhalb der UI des Spiels bearbeiten, löschen, manipulieren
  • Kann neue Layer erstellen

@MathiasBaumgartinger
Copy link
Contributor Author

For a deeper understanding we have defined three "user-stories":

Scenario 1: Instance Layers on Startup

grafik

Scenario 2: Adding a 3D wind turbine object

grafik

Scenario 3: Creating a new raster layer through the U

grafik

@MathiasBaumgartinger
Copy link
Contributor Author

d693969 provided a basic implementation for most of these classes.

@kb173 kb173 added the documentation Works, but needs to be documented label Dec 21, 2020
@kb173
Copy link
Member

kb173 commented Dec 21, 2020

We should move these descriptions and images to the wiki.

@kb173 kb173 removed the enhancement New feature or request label Dec 21, 2020
@MathiasBaumgartinger MathiasBaumgartinger changed the title Developmnet of a layer-based system Documentation of a layer-based system Dec 21, 2020
@kb173
Copy link
Member

kb173 commented Jul 28, 2021

Same as #248: rather than the Wiki, we'll use Markdown documents within the project source for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Works, but needs to be documented
Projects
None yet
Development

No branches or pull requests

2 participants