forked from nmwsharp/polyscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.cpp
More file actions
25 lines (18 loc) · 1016 Bytes
/
state.cpp
File metadata and controls
25 lines (18 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2017-2023, Nicholas Sharp and the Polyscope contributors. https://polyscope.run
#include "polyscope/polyscope.h"
namespace polyscope {
namespace state {
Context globalContext;
// Map all of the named global variables as references to the context struct
bool& initialized = globalContext.initialized;
std::string& backend = globalContext.backend;
std::map<std::string, std::map<std::string, std::unique_ptr<Structure>>>& structures = globalContext.structures;
std::map<std::string, std::unique_ptr<Group>>& groups = globalContext.groups;
float& lengthScale = globalContext.lengthScale;
std::tuple<glm::vec3, glm::vec3>& boundingBox = globalContext.boundingBox;
std::vector<std::unique_ptr<SlicePlane>>& slicePlanes = globalContext.slicePlanes;
std::vector<WeakHandle<Widget>>& widgets = globalContext.widgets;
bool& doDefaultMouseInteraction = globalContext.doDefaultMouseInteraction;
std::function<void()>& userCallback = globalContext.userCallback;
} // namespace state
} // namespace polyscope