feat(render): implement Campaign AR and terrain fidelity
This commit is contained in:
parent
99cf26e00c
commit
7a5f96ede5
368 changed files with 50611 additions and 950 deletions
|
|
@ -82,8 +82,23 @@ internal sealed class VulkanHostInputCameraCompositionFactory
|
|||
KeyBindings bindings) =>
|
||||
InputDispatcher.CreateDetached(keyboard, mouse, bindings);
|
||||
|
||||
public CameraController CreateCameraController() =>
|
||||
new(new OrbitCamera(), new FlyCamera());
|
||||
public CameraController CreateCameraController(
|
||||
float? initialOrbitDistanceMeters,
|
||||
float? initialOrbitYawDegrees,
|
||||
float? initialOrbitPitchDegrees)
|
||||
{
|
||||
var orbit = new OrbitCamera();
|
||||
if (initialOrbitDistanceMeters is { } distance)
|
||||
orbit.Distance = distance;
|
||||
if (initialOrbitYawDegrees is { } yaw)
|
||||
orbit.Yaw = DegreesToRadians(yaw);
|
||||
if (initialOrbitPitchDegrees is { } pitch)
|
||||
orbit.Pitch = DegreesToRadians(pitch);
|
||||
return new CameraController(orbit, new FlyCamera());
|
||||
}
|
||||
|
||||
private static float DegreesToRadians(float degrees) =>
|
||||
degrees * (MathF.PI / 180f);
|
||||
|
||||
public IFramebufferCameraTarget CreateCameraTarget(CameraController camera) =>
|
||||
new CameraFramebufferTarget(camera);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue