using System.Numerics; namespace AcDream.App.Rendering.Wb; /// /// Per-(entity, partIdx, batchIdx) classification result, stored flat inside /// . For Setup multi-part MeshRefs each /// subPart contributes its own entries, with /// already containing the /// subPart.PartTransform * meshRef.PartTransform product. /// /// Accessibility: internal because is /// internal and shows up in this struct's constructor / Deconstruct /// signature. The cache itself is dispatcher-internal coordination state; /// on AcDream.App exposes the type to /// AcDream.Core.Tests. /// internal readonly record struct CachedBatch( GroupKey Key, ulong BindlessTextureHandle, Matrix4x4 RestPose); /// /// One entity's cached classification. is flat across /// (partIdx, batchIdx) and ordered as WbDrawDispatcher.ClassifyBatches /// produced them. lets /// sweep entries /// efficiently when a landblock demotes or unloads. /// /// Accessibility: internal for the same reason as /// — its property is CachedBatch[], which /// transitively involves . /// internal sealed class EntityCacheEntry { public required uint EntityId { get; init; } public required uint LandblockHint { get; init; } public required CachedBatch[] Batches { get; init; } }