private IIntentStates _GetElementIntentList(Guid elementId) { IIntentStates elementIntentList; if (!_elementStates.TryGetValue(elementId, out elementIntentList)) { elementIntentList = new IntentStateList(); _elementStates[elementId] = elementIntentList; } return(elementIntentList); }
public void AddElementState(Guid elementId, IIntentState state) { lock (_elementStates) { IIntentStates elementIntentList; if (!_elementStates.TryGetValue(elementId, out elementIntentList)) { elementIntentList = new IntentStateList(4); _elementStates[elementId] = elementIntentList; } elementIntentList.AddIntentState(state); } }
private static Color ProcessIntentNodes(KeyValuePair <Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return(IntentHelpers.GetOpaqueRGBMaxColorForIntents(states)); }
private static Dictionary <Color, DiscreteValue> ProcessDiscreteIntentNodes(KeyValuePair <Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return(GetAlphaDiscreteColorsForIntents(states)); }
private static Color ProcessIntentNodes(KeyValuePair<Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return IntentHelpers.GetOpaqueRGBMaxColorForIntents(states); }
private static Dictionary<Color, DiscreteValue> ProcessDiscreteIntentNodes(KeyValuePair<Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return GetAlphaDiscreteColorsForIntents(states); }