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

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