feat(rendering): complete current-path render referee
Extend the non-drawing oracle through ordered PView routes, dispatcher visibility and final instance payloads, and accepted retail selection parts. Lifecycle artifacts can now referee the later shadow scene without influencing production visibility or draw decisions.
This commit is contained in:
parent
dbaea19269
commit
f9b68f8f2a
11 changed files with 964 additions and 41 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Numerics;
|
||||
using AcDream.App.Rendering.Scene;
|
||||
using AcDream.Core.Selection;
|
||||
using AcDream.Core.World;
|
||||
|
||||
|
|
@ -29,6 +30,7 @@ internal sealed class RetailSelectionScene :
|
|||
private List<RetailSelectionPart> _published = new();
|
||||
private readonly HashSet<PartKey> _buildingKeys = new();
|
||||
private FrustumPlanes? _viewFrustum;
|
||||
private ICurrentRenderSelectionObserver? _currentRenderSceneObserver;
|
||||
|
||||
private readonly record struct PartKey(uint LocalEntityId, int PartIndex, uint GfxObjId);
|
||||
|
||||
|
|
@ -56,9 +58,14 @@ internal sealed class RetailSelectionScene :
|
|||
out RetailSelectionLighting lighting)
|
||||
=> _lightingPulse.TryGet(serverGuid, localEntityId, out lighting);
|
||||
|
||||
internal void SetCurrentRenderSceneObserver(
|
||||
ICurrentRenderSelectionObserver? observer) =>
|
||||
_currentRenderSceneObserver = observer;
|
||||
|
||||
/// <summary>Clears every session-owned frame and material pulse.</summary>
|
||||
public void Reset()
|
||||
{
|
||||
_currentRenderSceneObserver?.AbortSelectionFrame();
|
||||
_building.Clear();
|
||||
_published.Clear();
|
||||
_buildingKeys.Clear();
|
||||
|
|
@ -71,6 +78,7 @@ internal sealed class RetailSelectionScene :
|
|||
_building.Clear();
|
||||
_buildingKeys.Clear();
|
||||
_viewFrustum = null;
|
||||
_currentRenderSceneObserver?.BeginSelectionFrame();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -105,17 +113,26 @@ internal sealed class RetailSelectionScene :
|
|||
partIndex,
|
||||
partWorld,
|
||||
mesh));
|
||||
_currentRenderSceneObserver?.ObserveSelectionPart(
|
||||
entity.ServerGuid,
|
||||
entity.Id,
|
||||
partIndex,
|
||||
gfxObjId,
|
||||
partWorld,
|
||||
mesh);
|
||||
}
|
||||
|
||||
public void CompleteFrame()
|
||||
{
|
||||
(_published, _building) = (_building, _published);
|
||||
_currentRenderSceneObserver?.CompleteSelectionFrame();
|
||||
}
|
||||
|
||||
/// <summary>Discards the incomplete building frame and preserves the last
|
||||
/// completely published selection product.</summary>
|
||||
public void AbortFrame()
|
||||
{
|
||||
_currentRenderSceneObserver?.AbortSelectionFrame();
|
||||
_building.Clear();
|
||||
_buildingKeys.Clear();
|
||||
_viewFrustum = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue