Event System (#1741)

* Add implementation of the EventEngine to handle global event chains
* Add properties to SceneGraphNodes to determine two distance radii for camera-based events
This commit is contained in:
Alexander Bock
2021-10-11 21:53:00 +02:00
committed by GitHub
parent d230675181
commit 76dd45e5ce
36 changed files with 2176 additions and 59 deletions
+15
View File
@@ -128,9 +128,17 @@ public:
SceneGraphNode* parent() const;
std::vector<SceneGraphNode*> children() const;
const std::vector<std::string>& onApproachAction() const;
const std::vector<std::string>& onReachAction() const;
const std::vector<std::string>& onRecedeAction() const;
const std::vector<std::string>& onExitAction() const;
double boundingSphere() const;
double interactionSphere() const;
double reachFactor() const;
double approachFactor() const;
SceneGraphNode* childNode(const std::string& identifier);
const Renderable* renderable() const;
@@ -155,6 +163,11 @@ private:
std::vector<SceneGraphNode*> _dependentNodes;
Scene* _scene = nullptr;
std::vector<std::string> _onApproachAction;
std::vector<std::string> _onReachAction;
std::vector<std::string> _onRecedeAction;
std::vector<std::string> _onExitAction;
// If this value is 'true' GUIs are asked to hide this node from collections, as it
// might be a node that is not very interesting (for example barycenters)
properties::BoolProperty _guiHidden;
@@ -183,6 +196,8 @@ private:
properties::DoubleProperty _boundingSphere;
properties::DoubleProperty _interactionSphere;
properties::DoubleProperty _approachFactor;
properties::DoubleProperty _reachFactor;
properties::BoolProperty _computeScreenSpaceValues;
properties::IVec2Property _screenSpacePosition;
properties::BoolProperty _screenVisibility;