public override void AffectIntent(IIntentSegment intentSegment, TimeSpan filterRelativeStartTime, TimeSpan filterRelativeEndTime) { _intentHandler.TimeSpan = TimeSpan; _intentHandler.StartTime = filterRelativeStartTime; _intentHandler.EndTime = filterRelativeEndTime; intentSegment.Dispatch(_intentHandler); }
public LinearInterpolatedIntentSegmentCollection(TypeOfValue startValue, TypeOfValue endValue, TimeSpan timeSpan, Interpolator <TypeOfValue> interpolator) : this(new LinearInterpolatedSegmentCreator <TypeOfValue>(interpolator)) { IIntentSegment <TypeOfValue> initialSegment = _CreateSegment(startValue, endValue, timeSpan); _Insert(initialSegment, TimeSpan.Zero); }
public override void Handle(IIntentSegment <CommandValue> obj) { _commandDispatch.ReductionPercentage = _StartPercentIntoFilter(); obj.StartValue.Command.Dispatch(_commandDispatch); obj.StartValue = new CommandValue(_commandDispatch.Command); _commandDispatch.ReductionPercentage = _EndPercentIntoFilter(); obj.EndValue.Command.Dispatch(_commandDispatch); obj.EndValue = new CommandValue(_commandDispatch.Command); }
public void AffectIntent(IIntentSegment intentSegment, TimeSpan contextAbsoluteStartTime, TimeSpan contextAbsoluteEndTime) { TimeSpan filterRelativeStartTime = _GetFilterRelativeStartTime(contextAbsoluteStartTime); TimeSpan filterRelativeEndTime = _GetFilterRelativeEndTime(contextAbsoluteEndTime); if (filterRelativeStartTime < TimeSpan && filterRelativeEndTime > TimeSpan.Zero) { Filter.AffectIntent(intentSegment, filterRelativeStartTime, filterRelativeEndTime); } }
public override void Handle(IIntentSegment<CommandValue> obj) { _commandDispatch.ReductionPercentage = _StartPercentIntoFilter(); obj.StartValue.Command.Dispatch(_commandDispatch); obj.StartValue = new CommandValue(_commandDispatch.Command); _commandDispatch.ReductionPercentage = _EndPercentIntoFilter(); obj.EndValue.Command.Dispatch(_commandDispatch); obj.EndValue = new CommandValue(_commandDispatch.Command); }
public void FractureAt(TimeSpan intentRelativeTime) { IntentSegmentNode <TypeOfValue> segmentNode = _GetSegmentIntersecting(intentRelativeTime); if (segmentNode == null) { return; } TimeSpan segmentRelativeTime = _GetSegmentRelativeTime(segmentNode, intentRelativeTime); TypeOfValue valueAtTimePoint = segmentNode.Segment.GetStateAt(segmentRelativeTime); IIntentSegment <TypeOfValue> leftSegment = _CreateSegment(segmentNode.Segment.StartValue, valueAtTimePoint, segmentRelativeTime); IIntentSegment <TypeOfValue> rightSegment = _CreateSegment(valueAtTimePoint, segmentNode.Segment.EndValue, segmentNode.Segment.TimeSpan - segmentRelativeTime); if (leftSegment != null && rightSegment != null) { _RemoveAt(segmentNode.StartTime); _Insert(leftSegment, segmentNode.StartTime); _Insert(rightSegment, segmentNode.StartTime + segmentRelativeTime); } }
virtual public void Handle(IIntentSegment <LightingValue> obj) { }
virtual public void Handle(IIntentSegment <CommandValue> obj) { }
public IntentSegmentNode(IIntentSegment <T> segment, TimeSpan startTime) { Segment = segment; StartTime = startTime; }
public override void Handle(IIntentSegment<LightingValue> obj) { obj.StartValue = _reducer.Reduce(obj.StartValue, _StartPercentIntoFilter()); obj.EndValue = _reducer.Reduce(obj.EndValue, _EndPercentIntoFilter()); }
public virtual void Handle(IIntentSegment<LightingValue> obj) { }
public virtual void Handle(IIntentSegment<CommandValue> obj) { }
public virtual void Handle(IIntentSegment<RGBValue> obj) { }
public virtual void Handle(IIntentSegment<PositionValue> obj) { }
virtual public void Handle(IIntentSegment <PositionValue> obj) { }
public override void Handle(IIntentSegment <LightingValue> obj) { obj.StartValue = _reducer.Reduce(obj.StartValue, _StartPercentIntoFilter()); obj.EndValue = _reducer.Reduce(obj.EndValue, _EndPercentIntoFilter()); }
private void _Insert(IIntentSegment <TypeOfValue> segment, TimeSpan startTime) { IntentSegmentNode <TypeOfValue> segmentNode = new IntentSegmentNode <TypeOfValue>(segment, startTime); _segmentTimeIndex.Add(startTime, segmentNode); }
abstract public void AffectIntent(IIntentSegment intentSegment, TimeSpan filterRelativeStartTime, TimeSpan filterRelativeEndTime);
public virtual void Handle(IIntentSegment <RGBValue> obj) { }