From 232ef7fc0220fa5434c4e4adb11fb47d0e6eb039 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Fri, 26 Apr 2024 00:33:16 +0100 Subject: [PATCH] Made meshinstance fields non-readonly. --- vnavmesh/SceneExtractor.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/vnavmesh/SceneExtractor.cs b/vnavmesh/SceneExtractor.cs index 8a25b0e..8c9ec93 100644 --- a/vnavmesh/SceneExtractor.cs +++ b/vnavmesh/SceneExtractor.cs @@ -36,20 +36,27 @@ public record struct Primitive(int V1, int V2, int V3, PrimitiveFlags Flags); public class MeshPart { - public List Vertices = new(); - public List Primitives = new(); + public List Vertices = []; + public List Primitives = []; } - public record class MeshInstance(ulong Id, Matrix4x3 WorldTransform, AABB WorldBounds, PrimitiveFlags ForceSetPrimFlags, PrimitiveFlags ForceClearPrimFlags); + public class MeshInstance(ulong id, Matrix4x3 worldTransform, AABB worldBounds, PrimitiveFlags forceSetPrimFlags, PrimitiveFlags forceClearPrimFlags) + { + public ulong Id = id; + public Matrix4x3 WorldTransform = worldTransform; + public AABB WorldBounds = worldBounds; + public PrimitiveFlags ForceSetPrimFlags = forceSetPrimFlags; + public PrimitiveFlags ForceClearPrimFlags = forceClearPrimFlags; + } public class Mesh { - public List Parts = new(); - public List Instances = new(); + public List Parts = []; + public List Instances = []; public MeshType MeshType; } - public Dictionary Meshes { get; private set; } = new(); + public Dictionary Meshes { get; private set; } = []; private const string _keyAnalyticBox = ""; private const string _keyAnalyticSphere = "";