10 namespace ShowControl {
53 void operator=(
const Timeline& other);
114 void setKeyframe(
string identifier,
size_t time,
string timelineID,
size_t offset = 0);
145 void moveKeyframe(
string id,
size_t oldTime,
size_t newTime);
180 bool addEvent(
size_t time, shared_ptr<Event> e);
198 vector<shared_ptr<Event> >
getEvents(
size_t time,
string id =
"");
226 virtual shared_ptr<LumiverseType>
getValueAtTime(
string id,
string paramName,
LumiverseType* currentVal,
size_t time, map<
string, shared_ptr<Timeline> >& tls);
239 virtual void executeEvents(
size_t prevTime,
size_t currentTime);
277 virtual JSONNode
toJSON();
289 virtual bool isDone(
size_t time, map<
string, shared_ptr<Timeline> >& tls);
297 virtual void setCurrentState(map<
string, map<string, LumiverseType*> >& state, shared_ptr<Timeline> active,
size_t time);
void setKeyframe(string identifier, size_t time, LumiverseType *data, bool ucs=false)
Sets the value for the specified keyframe.
Definition: Timeline.cpp:58
void deleteKeyframe(string identifier, size_t time)
Deletes the keyframe with the specified identifier at the specified time.
Definition: Timeline.cpp:98
Include file for all of LumiverseCore in one conveninent location.
virtual void setLoops(int loops)
Set the number of loops the timeline should execute.
Definition: Timeline.cpp:330
virtual shared_ptr< LumiverseType > getValueAtTime(string id, string paramName, LumiverseType *currentVal, size_t time, map< string, shared_ptr< Timeline > > &tls)
Returns the value of the specified parameter for the specified device at the specified time...
Definition: Timeline.cpp:223
map< string, shared_ptr< Event > > & getAllEndEvents()
Returns the end Events for this Timeline.
Definition: Timeline.cpp:219
bool addEvent(size_t time, shared_ptr< Event > e)
Adds an Event to the Timeline.
Definition: Timeline.cpp:166
This class is a wapper around a variety of different possible data types that might be needed by a De...
Definition: LumiverseType.h:33
Keyframe getKeyframe(string identifier, size_t time)
Gets the keyframe for a given identifier and time. Read-only.
Definition: Timeline.cpp:36
void deleteEvent(size_t time, string id="")
Deletes Events from the Timeline.
Definition: Timeline.cpp:171
map< string, Keyframe > getKeyframes(Device *d, size_t time)
Gets the keyframes for a given device and time. Read-only.
Definition: Timeline.cpp:40
virtual bool isDone(size_t time, map< string, shared_ptr< Timeline > > &tls)
Indicates if the Timeline has no more keyframes after the specified time.
Definition: Timeline.cpp:377
void updateKeyframeState(string id, string paramName, LumiverseType *param, shared_ptr< Timeline > tl, size_t time)
Updates the Keyframes marked as "Use Current State" in the Timeline's data.
Definition: Timeline.cpp:416
virtual JSONNode toJSON()
Gets the JSON representation of the timeline object.
Definition: Timeline.cpp:334
A Timeline is a list of device parameter values at arbitrary times.
Definition: Timeline.h:34
virtual ~Timeline()
Deletes a timeline.
Definition: Timeline.cpp:23
map< string, shared_ptr< Event > > _endEvents
List of events to call at the end.
Definition: Timeline.h:372
A DeviceSet is a set of devices.
Definition: DeviceSet.h:41
Timeline()
Creates an empty timeline.
Definition: Timeline.cpp:6
virtual void executeEvents(size_t prevTime, size_t currentTime)
Executes the events between the specified times.
Definition: Timeline.cpp:304
Keyframe getPreviousKeyframe(string identifier, size_t time)
Gets the keyframe closest to happen at or before the given time.
Definition: Timeline.cpp:438
shared_ptr< Event > getEndEvent(string id)
Gets an end Event.
Definition: Timeline.cpp:207
bool _loopLengthIsUpdated
Indicates if the timeline's loop length is updated.
Definition: Timeline.h:348
bool _lengthIsUpdated
Indicates if the timeline's length is updated.
Definition: Timeline.h:343
virtual void executeEndEvents()
Executes all end events in the timeline's list.
Definition: Timeline.cpp:320
A Keyframe stores the value of a parameter at the specified time.
Definition: Keyframe.h:17
virtual size_t getLength()
Gets the length of the timeline based on stored keyframes.
Definition: Timeline.cpp:471
void moveKeyframe(string id, size_t oldTime, size_t newTime)
Moves a keyframe from one time to a different time. If a keyframe already exists at the target time...
Definition: Timeline.cpp:116
void deleteKeyframesAfter(string id, size_t start)
Deletes all keyframes for an id that occur after (>) the start time.
Definition: Timeline.cpp:123
virtual void setCurrentState(map< string, map< string, LumiverseType * > > &state, shared_ptr< Timeline > active, size_t time)
Takes a state from the layer and updates the keyframes marked with "Use Current State".
Definition: Timeline.cpp:408
void deleteKeyframesBetween(size_t start, size_t end)
Deletes all keyframes between (start < keyframe < end) the specified times.
Definition: Timeline.cpp:137
int _loops
Describes how many times the timeline should loop.
Definition: Timeline.h:338
virtual int getLoops()
Returns the looping setting for this timeline.
Definition: Timeline.cpp:326
size_t _loopLength
Stores the loop length of the timleine.
Definition: Timeline.h:331
void deleteEndEvent(string id)
Deletes an end event.
Definition: Timeline.cpp:162
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
multimap< size_t, shared_ptr< Event > > _events
List of events and times that the events happen.
Definition: Timeline.h:364
map< string, map< size_t, Keyframe > > _timelineData
Map from unique identifier to timeline keyframes.
Definition: Timeline.h:359
bool addEndEvent(string id, shared_ptr< Event > e)
Adds a new event to the end of the timeline.
Definition: Timeline.cpp:153
size_t _length
Stores the length of the timeline.
Definition: Timeline.h:324
map< string, map< size_t, Keyframe > > & getAllKeyframes()
Gets the keyframes for the entire timeline.
Definition: Timeline.cpp:52
multimap< size_t, shared_ptr< Event > > & getAllEvents()
Returns the multimap containing the Events for this Timeline.
Definition: Timeline.cpp:215
The Rig contains information about the state of the lighting system.
Definition: Rig.h:58
A Device in Lumiverse maintains information about a lighting device.
Definition: Device.h:55
virtual string getTimelineTypeName()
Used for identifying different kinds of timelines.
Definition: Timeline.h:315
virtual size_t getLoopTime(size_t time)
Returns the time adjusted for the number of loops the timeline can perfrom.
Definition: Timeline.cpp:525
vector< shared_ptr< Event > > getEvents(size_t time, string id="")
Gets Events at the specified time.
Definition: Timeline.cpp:189
string getTimelineKey(Device *d, string paramName)
Gets the identifier used to refer to a device-parameter keyframe set.
Definition: Timeline.cpp:27
void loadJSON(JSONNode node)
Initializes the timeline with the given JSONNode's data.
Definition: Timeline.cpp:542
virtual size_t getLoopLength()
Gets the length of the timeline for a single loop.
Definition: Timeline.cpp:492