コード例 #1
0
        public void updatePath(Point3d point)
        {
            GridSquare currentSquare = grid.getGridSquareContainingPoint(point);

            if (currentSquare != null)
            {
                currentPath.AddLast(currentSquare);
            }

            // Advance to the next target
            if (currentSquare == currentTarget)
            {
                currentTarget = manipulatableTargetSequence.Dequeue();
            }

            double currentDistance = euclideanDistance(new Point2d(point.X, point.Y), currentTarget.getCenter());

            if (currentDistance > previousDistance)
            {
                failedAuthentication = true;
            }
            else
            {
                previousDistance = currentDistance;
            }
        }
コード例 #2
0
        public void updatePath(Point3d point)
        {
            GridSquare currentSquare = grid.getGridSquareContainingPoint(point);

            if (currentSquare != null)
            {
                currentPath.AddLast(currentSquare);
            }
        }
コード例 #3
0
ファイル: Grid.cs プロジェクト: siavash65/CSE481-3DAuth
        public CheckPointPath(Queue<GridSquare> targetSquares, Grid grid)
            : base(grid)
        {
            this.originalTargetSequence = targetSquares;
            this.completedTargets = new HashSet<GridSquare>();

            this.manipulatableTargetSequence = new Queue<GridSquare>();
            for (int i = 0; i < originalTargetSequence.Count; i++)
            {
                GridSquare square = originalTargetSequence.Dequeue();
                originalTargetSequence.Enqueue(square);
                manipulatableTargetSequence.Enqueue(square);
            }

            currentTarget = manipulatableTargetSequence.Dequeue();
            this.previousDistance = Double.MaxValue;
            this.failedAuthentication = false;
        }
コード例 #4
0
        public CheckPointPath(Queue <GridSquare> targetSquares, Grid grid)
            : base(grid)
        {
            this.originalTargetSequence = targetSquares;
            this.completedTargets       = new HashSet <GridSquare>();

            this.manipulatableTargetSequence = new Queue <GridSquare>();
            for (int i = 0; i < originalTargetSequence.Count; i++)
            {
                GridSquare square = originalTargetSequence.Dequeue();
                originalTargetSequence.Enqueue(square);
                manipulatableTargetSequence.Enqueue(square);
            }

            currentTarget             = manipulatableTargetSequence.Dequeue();
            this.previousDistance     = Double.MaxValue;
            this.failedAuthentication = false;
        }
コード例 #5
0
ファイル: Grid.cs プロジェクト: siavash65/CSE481-3DAuth
        public void updatePath(Point3d point)
        {
            GridSquare currentSquare = grid.getGridSquareContainingPoint(point);
            if (currentSquare != null)
            {
                currentPath.AddLast(currentSquare);
            }

            // Advance to the next target
            if (currentSquare == currentTarget)
            {
                currentTarget = manipulatableTargetSequence.Dequeue();
            }

            double currentDistance = euclideanDistance(new Point2d(point.X, point.Y), currentTarget.getCenter());
            if (currentDistance > previousDistance)
            {
                failedAuthentication = true;
            }
            else
            {
                previousDistance = currentDistance;
            }
        }