Пример #1
0
    public void addTestTrail()
    {
        mTrail.Clear();
        Vector3[] point1 = new Vector3[] {
            new Vector3(0.0f, 0.0f, 2.0f),
            new Vector3(0.0f, -1.7f, -1.0f),
            new Vector3(0.0f, 1.7f, -1.0f),
            new Vector3(0.0f, 0.0f, -2.0f)
        };
        PolygonVertices p1 = new PolygonVertices(point1);

        Vector3[] point2 = new Vector3[] {
            new Vector3(2.0f, 0.0f, 2f),
            new Vector3(2.0f, -1.7f, -1.0f),
            new Vector3(2.0f, 1.7f, -1.0f),
            new Vector3(2.0f, 0.0f, -2.0f)
        };
        PolygonVertices p2 = new PolygonVertices(point2);

        Vector3[] point3 = new Vector3[] {
            new Vector3(12.0f, 0.0f, 2f),
            new Vector3(12.0f, -1.7f, -1.0f),
            new Vector3(12.0f, 1.7f, -1.0f)
        };
        PolygonVertices p3 = new PolygonVertices(point3);

        mTrail.Add(p1);
        mTrail.Add(p2);
        //mTrail.Add(p3);
    }
Пример #2
0
        public void Apply()
        {
            var vertices     = PolygonVertices.Select(v => WgsUtmConverter.LatLonToUTMXY(v.Location, 0)).ToList();
            var needToRemove = _waypointsService.Waypoints.Where(wpt => !WgsUtmConverter.LatLonToUTMXY(wpt.Location, 0).IsInsidePolygon(vertices)).ToList();

            foreach (var wpt in needToRemove)
            {
                _waypointsService.Waypoints.Remove(wpt);
            }
        }
Пример #3
0
    public void addTrail(Vector3 point, Vector3 normal, int n, float radius, Vector3 movingDirection)
    {
        PolygonVertices p = new PolygonVertices(point, normal, n, radius, movingDirection);

        mTrail.Add(p);
    }