9 namespace ShowControl {
28 shared_ptr<Lumiverse::LumiverseType>
val;
51 bool operator<(
Keyframe other)
const {
64 Keyframe(
size_t time, shared_ptr<Lumiverse::LumiverseType> v,
bool upv) :
65 t(time), val(v), useCurrentState(upv) { }
75 Keyframe(
size_t time,
string id,
size_t offset) :
76 t(time), timelineID(id), timelineOffset(offset) { }
103 Event(
function<
void()> cb,
string id =
"");
110 Event(JSONNode node);
127 virtual void reset();
148 virtual JSONNode
toJSON();
Include file for all of LumiverseCore in one conveninent location.
string _id
Optional identifier to make it easier to delete and find Events.
Definition: Keyframe.h:138
virtual JSONNode toJSON()
While this object may not be able to serialize itself, other Event types may be able to...
Definition: Keyframe.cpp:90
function< void()> _callback
Callback function to execute when the Event is encountered.
Definition: Keyframe.h:154
Events are special keyframes that call other functions when encountered.
Definition: Keyframe.h:101
size_t t
Time at which this keyframe is located. t=0 is start of timeline.
Definition: Keyframe.h:23
virtual void setCallback(function< void()> cb)
Changes the callback function.
Definition: Keyframe.cpp:86
string timelineID
If not blank, this keyframe pulls its value from the given keyframe at the given offset.
Definition: Keyframe.h:40
virtual void execute()
Executes the event.
Definition: Keyframe.cpp:78
size_t timelineOffset
Start time for the Timeline referenced by timelineID.
Definition: Keyframe.h:45
A Keyframe stores the value of a parameter at the specified time.
Definition: Keyframe.h:17
Keyframe(size_t time, shared_ptr< Lumiverse::LumiverseType > v, bool upv)
Constructor with all values filled in.
Definition: Keyframe.h:64
virtual string getType()
Returns the typename of this Event.
Definition: Keyframe.h:143
bool useCurrentState
If true, the value of this keyframe will be pulled from the state of the layer when playback starts...
Definition: Keyframe.h:35
shared_ptr< Lumiverse::LumiverseType > val
Value of the keyframe at time t.
Definition: Keyframe.h:28
Keyframe(size_t time)
Constructor creates a blank keyframe at specified time.
Definition: Keyframe.h:81
virtual void reset()
If there are any things that need to be reset when the Timeline starts, this function will do that...
Definition: Keyframe.cpp:82
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
JSONNode toJSON()
Returns the JSON representation of this keyframe.
Definition: Keyframe.cpp:49
Keyframe()
Empty constructor.
Definition: Keyframe.h:56
Keyframe(size_t time, string id, size_t offset)
Constructs a nested Timeline Keyframe.
Definition: Keyframe.h:75