Skip to content

Commit

Permalink
Made meshinstance fields non-readonly.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Apr 25, 2024
1 parent 5d162e4 commit 232ef7f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions vnavmesh/SceneExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,27 @@ public record struct Primitive(int V1, int V2, int V3, PrimitiveFlags Flags);

public class MeshPart
{
public List<Vector3> Vertices = new();
public List<Primitive> Primitives = new();
public List<Vector3> Vertices = [];
public List<Primitive> 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<MeshPart> Parts = new();
public List<MeshInstance> Instances = new();
public List<MeshPart> Parts = [];
public List<MeshInstance> Instances = [];
public MeshType MeshType;
}

public Dictionary<string, Mesh> Meshes { get; private set; } = new();
public Dictionary<string, Mesh> Meshes { get; private set; } = [];

private const string _keyAnalyticBox = "<box>";
private const string _keyAnalyticSphere = "<sphere>";
Expand Down

0 comments on commit 232ef7f

Please sign in to comment.