mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
added events for when renderables are enabled/disabled that can be used to link renderables together (#2132)
This commit is contained in:
@@ -35,6 +35,7 @@ namespace openspace {
|
||||
class Camera;
|
||||
class Layer;
|
||||
class Profile;
|
||||
class Renderable;
|
||||
class SceneGraphNode;
|
||||
class ScreenSpaceRenderable;
|
||||
class Time;
|
||||
@@ -74,6 +75,8 @@ struct Event {
|
||||
LayerRemoved,
|
||||
SessionRecordingPlayback,
|
||||
PointSpacecraft,
|
||||
RenderableEnabled,
|
||||
RenderableDisabled,
|
||||
Custom
|
||||
};
|
||||
constexpr explicit Event(Type type_) : type(type_) {}
|
||||
@@ -397,6 +400,32 @@ struct EventPointSpacecraft : public Event {
|
||||
const double duration;
|
||||
};
|
||||
|
||||
/**
|
||||
* This event is created whenever a renderable is enabled. By the
|
||||
* time this event is signalled, the renderable has already been enabled.
|
||||
*
|
||||
* \param Node The identifier of the node that contains the renderable
|
||||
*/
|
||||
struct EventRenderableEnabled : public Event {
|
||||
static const Type Type = Event::Type::RenderableEnabled;
|
||||
|
||||
explicit EventRenderableEnabled(const SceneGraphNode* node_);
|
||||
const tstring node;
|
||||
};
|
||||
|
||||
/**
|
||||
* This event is created whenever a renderable is disabled. By the
|
||||
* time this event is signalled, the renderable has already been disabled.
|
||||
*
|
||||
* \param Node The identifier of that node that contains the renderable
|
||||
*/
|
||||
struct EventRenderableDisabled : public Event {
|
||||
static const Type Type = Event::Type::RenderableDisabled;
|
||||
|
||||
explicit EventRenderableDisabled(const SceneGraphNode* node_);
|
||||
const tstring node;
|
||||
};
|
||||
|
||||
/**
|
||||
* A custom event type that can be used in a pinch when no explicit event type is
|
||||
* available. This should only be used in special circumstances and it should be
|
||||
|
||||
Reference in New Issue
Block a user