Files
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

41 lines
1.5 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.BSP
{
/// <summary>
/// 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.
/// </summary>
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(GoldSrc)"/>
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class Plane
{
/// <summary>
/// The planes normal vector
/// </summary>
public Vector3D NormalVector = new();
/// <summary>
/// Plane equation is: vNormal * X = fDist
/// </summary>
public float Distance;
/// <summary>
/// Plane type
/// </summary>
public PlaneType PlaneType;
}
}