using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.BSP
{
///
/// Each of this structures defines a plane in 3-dimensional
/// space by using the Hesse normal form: normal * point - distance = 0
///
/// Where vNormal is the normalized normal vector of the plane
/// and fDist is the distance of the plane to the origin of
/// the coord system. Additionally, the structure also saves an
/// integer describing the orientation of the plane in space.
/// If nType equals PLANE_X, then the normal of the plane will
/// be parallel to the x axis, meaning the plane is perpendicular
/// to the x axis. If nType equals PLANE_ANYX, then the plane's
/// normal is nearer to the x axis then to any other axis.
/// This information is used by the renderer to speed up some
/// computations.
///
///
///
[StructLayout(LayoutKind.Sequential)]
public sealed class Plane
{
///
/// The planes normal vector
///
public Vector3D NormalVector = new();
///
/// Plane equation is: vNormal * X = fDist
///
public float Distance;
///
/// Plane type
///
public PlaneType PlaneType;
}
}