Lumiverse  2.5
A framework for creating lighting control applications
Public Member Functions | Private Attributes | List of all members
Lumiverse::ShowControl::Cue Class Reference

A cue stores data for a particular look (called a cue) More...

#include <Cue.h>

Inheritance diagram for Lumiverse::ShowControl::Cue:
Inheritance graph
[legend]
Collaboration diagram for Lumiverse::ShowControl::Cue:
Collaboration graph
[legend]

Public Member Functions

 Cue ()
 Makes a blank cue.
 
 Cue (Rig *rig)
 Constructs a cue from a rig. Default time is 3. More...
 
 Cue (Rig *rig, float time)
 Creates a cue from the current state of the rig with the given time. More...
 
 Cue (DeviceSet devices, float up, float down, float delay)
 Creates a cue from a set of devices. More...
 
 Cue (Rig *rig, float up, float down)
 
 Cue (Rig *rig, float up, float down, float delay)
 
 Cue (map< string, Device * > devices, float up, float down, float delay)
 
 Cue (JSONNode node)
 Creates a cue from a JSON node.
 
 Cue (const Cue &other)
 Copy a cue.
 
void operator= (const Cue &other)
 Does a deep copy of the cue data.
 
string getTimelineTypeName () override
 Used for identifying different kinds of timelines.
 
void update (Rig *rig)
 Updates the changes between the rig and this cue. More...
 
void update (DeviceSet devices)
 
void update (map< string, LumiverseType * > params)
 Updates the cue with the values specified for a particular identifier.
 
void update (string id, string param, LumiverseType *data)
 Updates a single parameter in the cue.
 
void setDelay (float delay)
 Sets the delay for a cue. More...
 
void setTime (float time)
 Sets the upfade and downfade to the specified value. More...
 
void setTime (float up, float down)
 Sets a time with an up and down fade that are different. More...
 
void setTime (float up, float down, float delay)
 Sets a time with an up, down, and delay for the cue. More...
 
float getUpfade ()
 
float getDownfade ()
 
float getDelay ()
 Gets the delay from a cue.
 
JSONNode toJSON () override
 Returns the JSON representation of the cue.
 
float getTransitionTime ()
 Returns the total transition time of the cue. More...
 
void setCurrentState (map< string, map< string, LumiverseType * > > &state, shared_ptr< Timeline > active, size_t time) override
 
shared_ptr< LumiverseTypegetLastCueValue (string id, string paramName)
 Gets the static value of the last keyframe in the cue if it exists.
 
- Public Member Functions inherited from Lumiverse::ShowControl::Timeline
 Timeline ()
 Creates an empty timeline.
 
 Timeline (JSONNode data)
 Load a Timeline from JSON data. More...
 
 Timeline (const Timeline &other)
 Copies a timeline.
 
void operator= (const Timeline &other)
 
virtual ~Timeline ()
 Deletes a timeline.
 
string getTimelineKey (Device *d, string paramName)
 Gets the identifier used to refer to a device-parameter keyframe set.
 
string getTimelineKey (string id, string paramName)
 Gets the identifier used to refer to a device-parameter keyframe set.
 
Keyframe getKeyframe (string identifier, size_t time)
 Gets the keyframe for a given identifier and time. Read-only. More...
 
map< string, KeyframegetKeyframes (Device *d, size_t time)
 Gets the keyframes for a given device and time. Read-only. More...
 
map< string, map< size_t, Keyframe > > & getAllKeyframes ()
 Gets the keyframes for the entire timeline.
 
void setKeyframe (string identifier, size_t time, LumiverseType *data, bool ucs=false)
 Sets the value for the specified keyframe. More...
 
void setKeyframe (Device *d, size_t time, bool ucs=false)
 Sets the value of the keyframes for all parameters of the given device.
 
void setKeyframe (Rig *rig, size_t time, bool ucs=false)
 Stores a keyframe from a rig.
 
void setKeyframe (DeviceSet devices, size_t time, bool ucs=false)
 Stores a keyframe for a group of selected devices.
 
void setKeyframe (string identifier, size_t time, string timelineID, size_t offset=0)
 Stores a nested timeline Keyframe for a particular identifier.
 
void setKeyframe (Device *d, size_t time, string timelineID, size_t offset=0)
 Stores a nested timeline Keyframe for a device.
 
void setKeyframe (DeviceSet devices, size_t time, string timelineID, size_t offset=0)
 Stores a nested timeline Keyframe for a group of selected devices.
 
void deleteKeyframe (string identifier, size_t time)
 Deletes the keyframe with the specified identifier at the specified time.
 
void deleteKeyframe (Device *d, size_t time)
 Deletes the keyframes for the specified device at the specified time.
 
void deleteKeyframe (DeviceSet devices, size_t time)
 Deletes the keyframes for the specified devices at the specified time.
 
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, it is overwritten.
 
void deleteKeyframesAfter (string id, size_t start)
 Deletes all keyframes for an id that occur after (>) the start time.
 
void deleteKeyframesBetween (size_t start, size_t end)
 Deletes all keyframes between (start < keyframe < end) the specified times.
 
bool addEndEvent (string id, shared_ptr< Event > e)
 Adds a new event to the end of the timeline. More...
 
void deleteEndEvent (string id)
 Deletes an end event. More...
 
bool addEvent (size_t time, shared_ptr< Event > e)
 Adds an Event to the Timeline. More...
 
void deleteEvent (size_t time, string id="")
 Deletes Events from the Timeline. More...
 
vector< shared_ptr< Event > > getEvents (size_t time, string id="")
 Gets Events at the specified time. More...
 
shared_ptr< EventgetEndEvent (string id)
 Gets an end Event. More...
 
multimap< size_t, shared_ptr< Event > > & getAllEvents ()
 Returns the multimap containing the Events for this Timeline.
 
map< string, shared_ptr< Event > > & getAllEndEvents ()
 Returns the end Events for this Timeline.
 
virtual shared_ptr< LumiverseTypegetValueAtTime (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. More...
 
virtual void executeEvents (size_t prevTime, size_t currentTime)
 Executes the events between the specified times. More...
 
virtual void executeEndEvents ()
 Executes all end events in the timeline's list.
 
virtual int getLoops ()
 Returns the looping setting for this timeline. More...
 
virtual void setLoops (int loops)
 Set the number of loops the timeline should execute. More...
 
virtual size_t getLength ()
 Gets the length of the timeline based on stored keyframes. More...
 
virtual size_t getLoopLength ()
 Gets the length of the timeline for a single loop. More...
 
virtual bool isDone (size_t time, map< string, shared_ptr< Timeline > > &tls)
 Indicates if the Timeline has no more keyframes after the specified time. More...
 
Keyframe getPreviousKeyframe (string identifier, size_t time)
 Gets the keyframe closest to happen at or before the given time. More...
 
virtual size_t getLoopTime (size_t time)
 Returns the time adjusted for the number of loops the timeline can perfrom.
 

Private Attributes

float _upfade
 
float _downfade
 
float _delay
 

Additional Inherited Members

- Protected Member Functions inherited from Lumiverse::ShowControl::Timeline
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.
 
void loadJSON (JSONNode node)
 Initializes the timeline with the given JSONNode's data.
 
- Protected Attributes inherited from Lumiverse::ShowControl::Timeline
size_t _length
 Stores the length of the timeline. More...
 
size_t _loopLength
 Stores the loop length of the timleine. More...
 
int _loops
 Describes how many times the timeline should loop. More...
 
bool _lengthIsUpdated
 Indicates if the timeline's length is updated.
 
bool _loopLengthIsUpdated
 Indicates if the timeline's loop length is updated.
 
map< string, map< size_t, Keyframe > > _timelineData
 Map from unique identifier to timeline keyframes. More...
 
multimap< size_t, shared_ptr< Event > > _events
 List of events and times that the events happen.
 
map< string, shared_ptr< Event > > _endEvents
 List of events to call at the end. More...
 

Detailed Description

A cue stores data for a particular look (called a cue)

In the traditional theatrical sense, cues are preset configurations of lighting device parameters. Cues are placed into cue lists and are then transitioned between with a simple cross fade when a user presses a button (typically labeled "GO").

Cues in Lumiverse are timelines, where each parameter can be assigned a value at an arbitrary time. Cue transitions are handled by doing an linear interpolation between the last keyframe of the previous cue, and the first keyframe of the current cue.

Cuees are specifically meant to replicate traditional lighting console cueing systems. If you just need standard animation timeline interface, see Timeline.

Cues have all the functinoality of a Lumiverse Timeline while providing some convenience functions to make programming easier.

Constructor & Destructor Documentation

Lumiverse::ShowControl::Cue::Cue ( Rig rig)

Constructs a cue from a rig. Default time is 3.

This constructor will make a cue by pulling all of the values from the Rig and storing them in the cue. It essentially "takes a picture" of the rig for use later.

Parameters
rigRig to create the cue from.
Lumiverse::ShowControl::Cue::Cue ( Rig rig,
float  time 
)

Creates a cue from the current state of the rig with the given time.

Parameters
timeFade time for the cue
Lumiverse::ShowControl::Cue::Cue ( DeviceSet  devices,
float  up,
float  down,
float  delay 
)

Creates a cue from a set of devices.

Generally this gets called by Layers or by the Programmer when creating a cue.

Parameters
devicesMap of devices to store.
timeDefault cue timing to use

Member Function Documentation

float Lumiverse::ShowControl::Cue::getTransitionTime ( )
inline

Returns the total transition time of the cue.

Returns
max(upfade, downfade) + delay
void Lumiverse::ShowControl::Cue::setCurrentState ( map< string, map< string, LumiverseType * > > &  state,
shared_ptr< Timeline active,
size_t  time 
)
overridevirtual

Adjusts timing of cues depending on if they are an upfade or a downfade

Reimplemented from Lumiverse::ShowControl::Timeline.

void Lumiverse::ShowControl::Cue::setDelay ( float  delay)

Sets the delay for a cue.

The delay tells the cue how long to wait before actually animating anything.

Parameters
delayDelay in seconds.
void Lumiverse::ShowControl::Cue::setTime ( float  time)

Sets the upfade and downfade to the specified value.

Parameters
timeUpfade/downfade in seconds.
void Lumiverse::ShowControl::Cue::setTime ( float  up,
float  down 
)

Sets a time with an up and down fade that are different.

Parameters
upUpfade in seconds
downDownfade in seconds
void Lumiverse::ShowControl::Cue::setTime ( float  up,
float  down,
float  delay 
)

Sets a time with an up, down, and delay for the cue.

Parameters
upUpfade in seconds
downDownfade in seconds
delayDelay in seconds
void Lumiverse::ShowControl::Cue::update ( Rig rig)

Updates the changes between the rig and this cue.

Tracking happens at the cue list level Returns a mapping of device id -> changed parameter and old value. Note that if you have internal cues, this will try to track changes through to those keyframes.

Parameters
rigRig that we're looking at for the update

The documentation for this class was generated from the following files: