mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-06 06:11:45 +00:00
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.
34 lines
1.1 KiB
C#
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;
|
|
}
|
|
}
|