// TEMPORARY COMMON DATA FOR DIFFERENT INTERNAL COMPONENTS #include "common.h" #include Camera camera(glm::vec3(0.0, 0.0, 3.0)); //std::vector parts; std::shared_ptr gDataModel = DataModel::New(); std::optional hierarchyPreUpdateHandler; std::optional hierarchyPostUpdateHandler; std::shared_ptr editorToolHandles = Handles::New(); std::vector currentSelection; std::vector selectionUpdateHandlers; void setSelection(std::vector newSelection, bool fromExplorer) { for (SelectionUpdateHandler handler : selectionUpdateHandlers) { handler(currentSelection, newSelection, fromExplorer); } currentSelection = newSelection; } const std::vector getSelection() { return currentSelection; } void addSelectionListener(SelectionUpdateHandler handler) { selectionUpdateHandlers.push_back(handler); }