diff --git a/thermion_dart/lib/src/viewer/src/shared_types/camera.dart b/thermion_dart/lib/src/viewer/src/shared_types/camera.dart index 27d35bf2..6702a236 100644 --- a/thermion_dart/lib/src/viewer/src/shared_types/camera.dart +++ b/thermion_dart/lib/src/viewer/src/shared_types/camera.dart @@ -5,6 +5,14 @@ import '../thermion_viewer_base.dart'; enum Projection { Perspective, Orthographic } abstract class Camera { + Future lookAt(Vector3 position, {Vector3? focus, Vector3? up}) async { + focus ??= Vector3.zero(); + up ??= Vector3(0, 1, 0); + final viewMatrix = makeViewMatrix(position, focus, up); + viewMatrix.invert(); + await setModelMatrix(viewMatrix); + } + Future setProjection(Projection projection, double left, double right, double bottom, double top, double near, double far); Future setProjectionMatrixWithCulling( diff --git a/thermion_dart/lib/src/viewer/src/shared_types/render_target.dart b/thermion_dart/lib/src/viewer/src/shared_types/render_target.dart index 0e5c4c17..3a03b11a 100644 --- a/thermion_dart/lib/src/viewer/src/shared_types/render_target.dart +++ b/thermion_dart/lib/src/viewer/src/shared_types/render_target.dart @@ -2,4 +2,5 @@ import 'package:thermion_dart/thermion_dart.dart'; abstract class RenderTarget { Future getColorTexture(); + Future getDepthTexture(); } diff --git a/thermion_dart/lib/src/viewer/src/shared_types/view.dart b/thermion_dart/lib/src/viewer/src/shared_types/view.dart index 4b3dadd6..4bb2bdb6 100644 --- a/thermion_dart/lib/src/viewer/src/shared_types/view.dart +++ b/thermion_dart/lib/src/viewer/src/shared_types/view.dart @@ -23,7 +23,7 @@ enum QualityLevel { abstract class View { Future getViewport(); - Future updateViewport(int width, int height); + Future setViewport(int width, int height); Future getRenderTarget(); Future setRenderTarget(covariant RenderTarget? renderTarget); Future setCamera(covariant Camera camera);