public override void AffectIntent(IIntentSegment intentSegment, TimeSpan filterRelativeStartTime, TimeSpan filterRelativeEndTime)
 {
     _intentHandler.TimeSpan  = TimeSpan;
     _intentHandler.StartTime = filterRelativeStartTime;
     _intentHandler.EndTime   = filterRelativeEndTime;
     intentSegment.Dispatch(_intentHandler);
 }
 public override void AffectIntent(IIntentSegment intentSegment, TimeSpan filterRelativeStartTime, TimeSpan filterRelativeEndTime)
 {
     _intentHandler.TimeSpan = TimeSpan;
     _intentHandler.StartTime = filterRelativeStartTime;
     _intentHandler.EndTime = filterRelativeEndTime;
     intentSegment.Dispatch(_intentHandler);
 }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
            }
        }
Exemple #6
0
		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);
		}
Exemple #7
0
        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);
            }
        }
Exemple #8
0
 virtual public void Handle(IIntentSegment <LightingValue> obj)
 {
 }
Exemple #9
0
 virtual public void Handle(IIntentSegment <CommandValue> obj)
 {
 }
Exemple #10
0
 public IntentSegmentNode(IIntentSegment <T> segment, TimeSpan startTime)
 {
     Segment   = segment;
     StartTime = startTime;
 }
Exemple #11
0
		public override void Handle(IIntentSegment<LightingValue> obj)
		{
			obj.StartValue = _reducer.Reduce(obj.StartValue, _StartPercentIntoFilter());
			obj.EndValue = _reducer.Reduce(obj.EndValue, _EndPercentIntoFilter());
		}
Exemple #12
0
 public virtual void Handle(IIntentSegment<LightingValue> obj)
 {
 }
Exemple #13
0
 public virtual void Handle(IIntentSegment<CommandValue> obj)
 {
 }
Exemple #14
0
 public virtual void Handle(IIntentSegment<RGBValue> obj)
 {
 }
Exemple #15
0
 public virtual void Handle(IIntentSegment<PositionValue> obj)
 {
 }
Exemple #16
0
 virtual public void Handle(IIntentSegment <PositionValue> obj)
 {
 }
Exemple #17
0
 public override void Handle(IIntentSegment <LightingValue> obj)
 {
     obj.StartValue = _reducer.Reduce(obj.StartValue, _StartPercentIntoFilter());
     obj.EndValue   = _reducer.Reduce(obj.EndValue, _EndPercentIntoFilter());
 }
Exemple #18
0
        private void _Insert(IIntentSegment <TypeOfValue> segment, TimeSpan startTime)
        {
            IntentSegmentNode <TypeOfValue> segmentNode = new IntentSegmentNode <TypeOfValue>(segment, startTime);

            _segmentTimeIndex.Add(startTime, segmentNode);
        }
Exemple #19
0
 abstract public void AffectIntent(IIntentSegment intentSegment, TimeSpan filterRelativeStartTime, TimeSpan filterRelativeEndTime);
 public virtual void Handle(IIntentSegment <RGBValue> obj)
 {
 }