Beispiel #1
0
        public WaypointSequence ToAbsolute(LocationValue referenceLoc)
        {
            WaypointSequence abs = new WaypointSequence();
            Waypoint         newWP;

            foreach (Waypoint wp in this)
            {
                newWP = new Waypoint(wp);

                newWP.Location.X = referenceLoc.X + wp.Location.X;
                newWP.Location.Y = referenceLoc.Y + wp.Location.Y;
                newWP.Location.Z = referenceLoc.Z + wp.Location.Z;

                abs.Add(newWP);
            }
            abs.m_nextIndex = this.m_nextIndex;
            return(abs);
        }
Beispiel #2
0
        public WaypointSequence ToRelative(LocationValue referenceLoc)
        {
            WaypointSequence rel = new WaypointSequence();

            Waypoint newWP;

            foreach (Waypoint wp in this)
            {
                newWP = new Waypoint(wp);

                newWP.Location.X = wp.Location.X - referenceLoc.X;
                newWP.Location.Y = wp.Location.Y - referenceLoc.Y;
                newWP.Location.Z = wp.Location.Z - referenceLoc.Z;

                rel.Add(newWP);
            }
            rel.m_nextIndex = this.m_nextIndex;
            return(rel);
        }