The current division of responsibility between the Simulation class, EventBasedSimulation, and individual sims is messy due to the rendering of statistics. Need to pull the concept of layers into the Simulation abstraction. To further complicate things, layers can be toggled as displayed or not using the simulation toolbar.
Tasks
[x] Simulation Class: Implement the add_layer method.
[ ] Simulation Class: Implement the remove_layer method.
[x] SingleAgentSimulation: Update to work with the layer abstraction.
[x] EventBasedAgentsSimulation: Update to work with the layer abstraction.
Common Layers
Terrain
Navigation Mesh
Navigation Paths
Agents
Rendering Layers
Layers are technically rendered using DearPyGUI.draw_layer call. These need to be established in a DearPyGUI.draw_list.
Layer Related Components
Draw List
Draw Layer block (code of what to render in the layer)
Tool Bar Menu Items
Tag ID
Operations
From an abstraction perspective these are the activities involving layers that need to be supported.
Add Layer
def add_layer(id: DearPyGUITag, layer: Callable, label: str) -> None:
"""Adds a layer
Args
- id: The layer identifier.
- layer: The code to run to render the layer.
- label: The text to display in the Layers menu of the simulation toolbar.
"""
# Makes the layer available for rendering in the draw_list.
# Adds a toggle control in the Layers menu.
Remove Layer
def remove_layer(id: DearPyGUITag) -> None:
""" Removes a layer from the simulation
Args
- id: The layer identifier.
"""
pass
The current division of responsibility between the Simulation class, EventBasedSimulation, and individual sims is messy due to the rendering of statistics. Need to pull the concept of layers into the Simulation abstraction. To further complicate things, layers can be toggled as displayed or not using the simulation toolbar.
Tasks
Common Layers
Rendering Layers
Layers are technically rendered using DearPyGUI.draw_layer call. These need to be established in a DearPyGUI.draw_list.
Layer Related Components
Operations
From an abstraction perspective these are the activities involving layers that need to be supported.
Add Layer
Remove Layer