feat: added 3D AABB primitive

This commit is contained in:
2025-10-19 18:34:48 +03:00
parent 1d63391975
commit a9fc819268
4 changed files with 198 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using LiteNetLib.Utils;
using Engine.Core;
namespace Engine.Systems.Network;
internal static class AABB3DNetPacker
{
internal static void Write(NetDataWriter writer, AABB3D data)
{
Vector3DNetPacker.Write(writer, data.LowerBoundary);
Vector3DNetPacker.Write(writer, data.UpperBoundary);
}
internal static AABB3D Read(NetDataReader reader)
{
Vector3D lowerBoundary = Vector3DNetPacker.Read(reader);
Vector3D upperBoundary = Vector3DNetPacker.Read(reader);
return new AABB3D(lowerBoundary, upperBoundary);
}
}