camera-restore: - IEngineStateProvider.SetCamera 반사 쓰기 (HmegDirectStateProvider) - POST /camera/restore (BridgeHttpServer, StateRouter) - Recorder --sidecar-url + camera_snapshot 캡처 - UiaPlayerHost.TryRestoreCamera, PlayerEngine 재생 전 복원 - 149 tests LauncherUI (#15): - Sidecar URL 체크박스 + 입력란 (녹화/재생 모두 연동) - 재생 속도 슬라이더 (0.25x~4.0x, 기본 1.0x) - 빌드 타임스탬프 타이틀바 표시 - 녹화 완료 후 RecordNameBox 초기화 - UiAnalysisWindow 추가 PlayerEngine (#15): - CancellationToken 지원 (중단 버튼 동작) - Focus 스텝 early return (no-op, issue #11) - Type/Drag unresolvable UIA path fallback - SpeedMultiplier 옵션 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
namespace Recordingtest.Bridge;
|
|
|
|
/// <summary>
|
|
/// Generic, SUT-neutral abstraction for reading the current engine state of
|
|
/// a WPF application under test. Implementations may delegate to a SUT-side
|
|
/// in-process bridge (HmEG-aware tier), to a reflection probe, or to a stub.
|
|
///
|
|
/// This interface lives in <c>Recordingtest.Bridge.Abstractions</c> so that
|
|
/// every higher tier (HmEG-aware / app-specific) can target it without the
|
|
/// generic core ever seeing a SUT-specific symbol.
|
|
/// </summary>
|
|
public interface IEngineStateProvider
|
|
{
|
|
IReadOnlyList<string> GetSelectedIds();
|
|
CameraSnapshot GetCamera();
|
|
SceneSnapshot GetScene();
|
|
bool GetRenderComplete();
|
|
/// <summary>
|
|
/// Restore the camera state in the live SUT. Best-effort: implementations
|
|
/// that cannot write the camera (reflection fallback, null provider) must
|
|
/// swallow any exception and return silently.
|
|
/// </summary>
|
|
void SetCamera(CameraSnapshot snapshot);
|
|
}
|
|
|
|
public sealed record CameraSnapshot(double[] Eye, double[] Target, double[] Up, double Fov);
|
|
public sealed record SceneSnapshot(int ObjectCount, string? DocumentPath);
|
|
|
|
/// <summary>
|
|
/// Safe-default provider used when no real SUT bridge is available
|
|
/// (CI / unit tests / startup race window).
|
|
/// </summary>
|
|
public sealed class NullEngineStateProvider : IEngineStateProvider
|
|
{
|
|
public IReadOnlyList<string> GetSelectedIds() => Array.Empty<string>();
|
|
public CameraSnapshot GetCamera() => new(
|
|
new double[] { 0, 0, 0 },
|
|
new double[] { 0, 0, 0 },
|
|
new double[] { 0, 0, 1 },
|
|
45.0);
|
|
public SceneSnapshot GetScene() => new(0, null);
|
|
public bool GetRenderComplete() => true;
|
|
public void SetCamera(CameraSnapshot snapshot) { /* no-op */ }
|
|
}
|