// Copyright (c) 2015 Robert Rouhani and other contributors (see CONTRIBUTORS file). // Licensed under the MIT License - https://raw.github.com/Robmaister/SharpNav/master/LICENSE using System; using System.Runtime.InteropServices; using SharpNav.Geometry; #if MONOGAME using Vector3 = Microsoft.Xna.Framework.Vector3; #elif OPENTK using Vector3 = OpenTK.Vector3; #elif SHARPDX using Vector3 = SharpDX.Vector3; #endif namespace SharpNav.Pathfinding { /// /// A point in a navigation mesh. /// [Serializable] [StructLayout(LayoutKind.Sequential)] public struct NavPoint { /// /// A null point that isn't associated with any polygon. /// public static readonly NavPoint Null = new NavPoint(0, Vector3.Zero); /// /// A reference to the polygon this point is on. /// public int Polygon; /// /// The 3d position of the point. /// public Vector3 Position; /// /// Initializes a new instance of the struct. /// /// The polygon that the point is on. /// The 3d position of the point. public NavPoint(int poly, Vector3 pos) { this.Polygon = poly; this.Position = pos; } } }