Add events when paths are started or finished (closes #1834)

This commit is contained in:
Alexander Bock
2023-03-11 17:20:20 +01:00
parent 3f35fa992a
commit ddcbe85b51
4 changed files with 68 additions and 8 deletions
+26
View File
@@ -77,6 +77,8 @@ struct Event {
PointSpacecraft,
RenderableEnabled,
RenderableDisabled,
CameraPathStarted,
CameraPathFinished,
Custom
};
constexpr explicit Event(Type type_) : type(type_) {}
@@ -520,6 +522,30 @@ struct EventRenderableDisabled : public Event {
const tstring node;
};
/**
* This event is created when the a camera path is started
*/
struct EventCameraPathStarted : public Event {
static constexpr Type Type = Event::Type::CameraPathStarted;
/**
* Creates an instance of an EventCameraPathStarted event.
*/
EventCameraPathStarted();
};
/**
* This event is created when the a camera path is finished
*/
struct EventCameraPathFinished : public Event {
static constexpr Type Type = Event::Type::CameraPathFinished;
/**
* Creates an instance of an EventCameraPathStarted event.
*/
EventCameraPathFinished();
};
/**
* 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
+1 -1
View File
@@ -76,7 +76,7 @@ public:
CameraPose traversePath(double dt, float speedScale = 1.f);
/**
* Function that can be used to permaturely quit a path ,for example when skipping
* Function that can be used to permaturely quit a path, for example when skipping
* to the end
*/
void quitPath();