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>
|
2025-10-30 20:44:16 -04:00
|
|
|
/// Collision data of length <see cref="SolidCount"/>
|
2025-09-26 10:57:15 -04:00
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
public PhysSolid[] Solids = [];
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
2025-10-30 20:44:16 -04:00
|
|
|
/// Key data of size <see cref="KeydataSize"/>
|
2025-09-26 10:57:15 -04:00
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
public byte[] TextData = [];
|
2025-09-26 10:57:15 -04:00
|
|
|
}
|
2025-10-30 20:44:16 -04:00
|
|
|
}
|