From be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9 Mon Sep 17 00:00:00 2001 From: Kiet Tran Date: Thu, 9 Dec 2021 15:37:16 -0600 Subject: Clarify how to get eye point in Sky::ScreenPtHitsSky --- dev/a6-harold/sky.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/a6-harold/sky.cc b/dev/a6-harold/sky.cc index 0819ebe..bc08ca0 100644 --- a/dev/a6-harold/sky.cc +++ b/dev/a6-harold/sky.cc @@ -28,6 +28,11 @@ void Sky::Init(ShaderProgram *stroke3d_shaderprog) { bool Sky::ScreenPtHitsSky(const Matrix4 &view_matrix, const Matrix4 &proj_matrix, const Point2 &normalized_screen_pt, Point3 *sky_point) { + // You will need the eye point, this can be + // determined from the view matrix as follows: + Matrix4 camera_matrix = view_matrix.Inverse(); + Point3 eye = camera_matrix.ColumnToPoint3(3); + // TODO: Stitch together your worksheet implementation of this method return true; } -- cgit v1.2.3