コード例 #1
0
ファイル: MotionWindow.cs プロジェクト: kmate95/HomeCenter
        public MotionWindow AccumulateVector(MotionPoint mp, Func <MotionPoint, MotionPoint, bool> isProperVectorCheck)
        {
            if (isProperVectorCheck(Start, mp))
            {
                var vector = new MotionVector(Start, mp);
                if (!_vectorsHistory.Contains(vector))
                {
                    _vectorsHistory.Add(vector);
                    _vectors.Add(vector);
                }
            }

            return(this);
        }
コード例 #2
0
        public MotionWindow AccumulateVector(MotionPoint mp)
        {
            if (_roomService.IsProperVector(Start, mp))
            {
                var vector = new MotionVector(Start, mp);
                if (!_vectorsHistory.Contains(vector))
                {
                    _vectorsHistory.Add(vector);
                    _vectors.Add(vector);
                }
            }

            return(this);
        }
コード例 #3
0
 public bool Contains(MotionPoint p) => _start.Equals(p) || _end.Equals(p);
コード例 #4
0
 public MotionVector(MotionPoint startPoint, MotionPoint endPoint)
 {
     _start = startPoint;
     _end   = endPoint;
 }
コード例 #5
0
ファイル: MotionWindow.cs プロジェクト: kmate95/HomeCenter
 public MotionWindow(string place, DateTimeOffset time)
 {
     Start = new MotionPoint(place, time);
 }
コード例 #6
0
ファイル: MotionWindow.cs プロジェクト: kmate95/HomeCenter
 public MotionWindow(MotionPoint start)
 {
     Start = start;
 }
コード例 #7
0
 public MotionWindow(string place, DateTimeOffset time, RoomService roomService)
 {
     Start        = new MotionPoint(place, time);
     _roomService = roomService;
 }
コード例 #8
0
ファイル: MotionVector.cs プロジェクト: kmate95/HomeCenter
 public bool Contains(MotionPoint p) => Start.Equals(p) || End.Equals(p);