Files
SabreTools.Serialization/SabreTools.Data.Models/BSP/PhysModel.cs

43 lines
1.1 KiB
C#
Raw Normal View History

2025-09-26 10:57:15 -04:00
using System.Runtime.InteropServices;
2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.BSP
2025-09-26 10:57:15 -04:00
{
/// <summary>
/// The physcollide lump (Lump 29) contains physics data for the world.
/// </summary>
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class PhysModel
{
/// <summary>
/// Perhaps the index of the model to which this physics model applies?
/// </summary>
public int ModelIndex;
/// <summary>
/// Total size of the collision data sections
/// </summary>
public int DataSize;
/// <summary>
/// Size of the text section
/// </summary>
public int KeydataSize;
/// <summary>
/// Number of collision data sections
/// </summary>
public int SolidCount;
/// <summary>
/// Collision data of length <see cref="SolidCount"/>
2025-09-26 10:57:15 -04:00
/// </summary>
public PhysSolid[] Solids = [];
2025-09-26 10:57:15 -04:00
/// <summary>
/// Key data of size <see cref="KeydataSize"/>
2025-09-26 10:57:15 -04:00
/// </summary>
public byte[] TextData = [];
2025-09-26 10:57:15 -04:00
}
}