Files
SabreTools.Serialization/SabreTools.Data.Models/BSP/DispVert.cs
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

34 lines
1.1 KiB
C#

using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.BSP
{
/// <summary>
/// The DispVerts lump (Lump 33) contains the vertex data of the displacements.
/// vec is the normalized vector of the offset of each displacement vertex from
/// its original (flat) position; dist is the distance the offset has taken
/// place; and alpha is the alpha-blending of the texture at that vertex.
///
/// A displacement of power p references (2^p + 1)^2 dispverts in the array,
/// starting from the DispVertStart index.
/// </summary>
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DispVert
{
/// <summary>
/// Vector field defining displacement volume.
/// </summary>
public Vector3D Vec = new();
/// <summary>
/// Displacement distances.
/// </summary>
public float Dist;
/// <summary>
/// "Per vertex" alpha values.
/// </summary>
public float Alpha;
}
}