Skip to content

Commit

Permalink
Add the AABB fields in the key of meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
aldelaro5 committed May 31, 2024
1 parent cfcbb3e commit 21e0b7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions AssetRipper.Mining.PredefinedAssets/AabbBounds.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using System.Numerics;

namespace AssetRipper.Mining.PredefinedAssets;

public record struct AabbBounds(Vector3 Center, Vector3 Extents);
8 changes: 6 additions & 2 deletions AssetRipper.Mining.PredefinedAssets/Mesh.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
namespace AssetRipper.Mining.PredefinedAssets;
using System.Numerics;

namespace AssetRipper.Mining.PredefinedAssets;

public sealed record class Mesh : NamedObject
{
public required int VertexCount { get; init; }
public required int SubMeshCount { get; init; }
public required AabbBounds AxisAlignedBoundingBox { get; init; }

public Mesh()
{
}

[SetsRequiredMembers]
public Mesh(string name, int vertexCount, int subMeshCount) : base(name)
public Mesh(string name, int vertexCount, int subMeshCount, AabbBounds axisAlignedBoundingBox) : base(name)
{
VertexCount = vertexCount;
SubMeshCount = subMeshCount;
AxisAlignedBoundingBox = axisAlignedBoundingBox;
}
}

0 comments on commit 21e0b7d

Please sign in to comment.