refactor(pipeline): MP1a cleanup - narrow public surface, csproj parity, move residue
Coordinator-directed final cleanup before the user gate; none behavioral: 1. MeshExtractor public surface narrowed to the cross-assembly entry points App actually calls (PrepareMeshData, PrepareCellStructMeshData, CollectParts, ComputeBounds); PrepareSetupMeshData, CollectEmittersFromScript, PrepareGfxObjMeshData, PrepareEnvCellMeshData, PrepareCellStructEdgeLineData back to private (internal dispatch, only reached via PrepareMeshData). 2. sideStagedSink constructor parameter is now REQUIRED (no default; type stays nullable for a conscious null): a bake tool that forgot the sink would silently lose particle-preload meshes. 3. AcDream.Content.csproj gains TreatWarningsAsErrors + LangVersion latest (parity with AcDream.Core.csproj). Surfaced zero warnings. 4. Dead usings removed from ObjectMeshManager.cs (BCnEncoder.*, SixLabors.*) — the inline decode moved out in Task 4. 5. Doc fixes: ObjectMeshData.cs cross-assembly <see cref> -> plain text (Content can't resolve App types); IDatReaderWriter.cs stale Phase O-T7 'both in this namespace' sentence rewritten. 6. Stale test doc comments updated to MeshExtractor.PrepareGfxObjMeshData (StipplingSurfaceEquivalenceTests, Issue119UpNullGfxObjDumpTests) — comments only, no code/assertion changes. dotnet build green (0 warnings in Content under warnings-as-errors); full test suite 4059 passed / 0 failed / 4 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
932f904e00
commit
b0758d772b
7 changed files with 27 additions and 24 deletions
|
|
@ -49,10 +49,14 @@ public sealed class MeshExtractor {
|
|||
/// The MP1b bake tool passes its own collector. The sink must be
|
||||
/// thread-safe: one MeshExtractor is shared by up to MaxParallelLoads (4)
|
||||
/// decode workers.
|
||||
/// The constructor argument is REQUIRED (no default): a bake tool that
|
||||
/// forgot the sink would silently lose particle-preload meshes; requiring
|
||||
/// the argument forces the decision. The type stays nullable so a caller
|
||||
/// can consciously pass null when preloads are irrelevant.
|
||||
/// </summary>
|
||||
private readonly Action<ObjectMeshData>? _sideStagedSink;
|
||||
|
||||
public MeshExtractor(IDatReaderWriter dats, ILogger logger, Action<ObjectMeshData>? sideStagedSink = null) {
|
||||
public MeshExtractor(IDatReaderWriter dats, ILogger logger, Action<ObjectMeshData>? sideStagedSink) {
|
||||
_dats = dats;
|
||||
_logger = logger;
|
||||
_sideStagedSink = sideStagedSink;
|
||||
|
|
@ -120,7 +124,7 @@ public sealed class MeshExtractor {
|
|||
}
|
||||
}
|
||||
|
||||
public ObjectMeshData? PrepareSetupMeshData(ulong id, Setup setup, CancellationToken ct) {
|
||||
private ObjectMeshData? PrepareSetupMeshData(ulong id, Setup setup, CancellationToken ct) {
|
||||
var parts = new List<(ulong GfxObjId, Matrix4x4 Transform)>();
|
||||
var min = new Vector3(float.MaxValue);
|
||||
var max = new Vector3(float.MinValue);
|
||||
|
|
@ -146,7 +150,7 @@ public sealed class MeshExtractor {
|
|||
};
|
||||
}
|
||||
|
||||
public void CollectEmittersFromScript(uint scriptId, List<StagedEmitter> emitters, CancellationToken ct) {
|
||||
private void CollectEmittersFromScript(uint scriptId, List<StagedEmitter> emitters, CancellationToken ct) {
|
||||
if (_dats.Portal.TryGet<PhysicsScript>(scriptId, out var script)) {
|
||||
foreach (var hook in script.ScriptData) {
|
||||
if (hook.Hook.HookType == AnimationHookType.CreateParticle && hook.Hook is CreateParticleHook particleHook) {
|
||||
|
|
@ -295,7 +299,7 @@ public sealed class MeshExtractor {
|
|||
}
|
||||
}
|
||||
|
||||
public ObjectMeshData? PrepareGfxObjMeshData(ulong id, GfxObj gfxObj, Vector3 scale, CancellationToken ct) {
|
||||
private ObjectMeshData? PrepareGfxObjMeshData(ulong id, GfxObj gfxObj, Vector3 scale, CancellationToken ct) {
|
||||
var vertices = new List<VertexPositionNormalTexture>();
|
||||
var UVLookup = new Dictionary<(ushort vertId, ushort uvIdx, bool isNeg), ushort>();
|
||||
var batchesByFormat = new Dictionary<(int Width, int Height, TextureFormat Format), List<TextureBatchData>>();
|
||||
|
|
@ -562,7 +566,7 @@ public sealed class MeshExtractor {
|
|||
};
|
||||
}
|
||||
|
||||
public ObjectMeshData? PrepareEnvCellMeshData(ulong id, EnvCell envCell, CancellationToken ct) {
|
||||
private ObjectMeshData? PrepareEnvCellMeshData(ulong id, EnvCell envCell, CancellationToken ct) {
|
||||
var parts = new List<(ulong GfxObjId, Matrix4x4 Transform)>();
|
||||
var min = new Vector3(float.MaxValue);
|
||||
var max = new Vector3(float.MinValue);
|
||||
|
|
@ -1069,7 +1073,7 @@ public sealed class MeshExtractor {
|
|||
return (min, max);
|
||||
}
|
||||
|
||||
public ObjectMeshData? PrepareCellStructEdgeLineData(ulong id, Dictionary<uint, CellStruct> cellStructs, Matrix4x4 transform, CancellationToken ct) {
|
||||
private ObjectMeshData? PrepareCellStructEdgeLineData(ulong id, Dictionary<uint, CellStruct> cellStructs, Matrix4x4 transform, CancellationToken ct) {
|
||||
var cellStructList = cellStructs.ToList();
|
||||
if (cellStructList.Count == 0) {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue