aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a6-harold
diff options
context:
space:
mode:
authorKiet Tran <tran0563@umn.edu>2021-12-09 15:37:16 -0600
committerGitHub Enterprise <noreply-github@umn.edu>2021-12-09 15:37:16 -0600
commitbe19aab73bc47ff5d1f8dafd40cbc67a33dc63e9 (patch)
tree5d1754d25dd9823673ba8afabf5047626896fd4c /dev/a6-harold
parentUpdate a6_harold.md (diff)
downloadcsci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar.gz
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar.bz2
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar.lz
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar.xz
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.tar.zst
csci4611-be19aab73bc47ff5d1f8dafd40cbc67a33dc63e9.zip
Clarify how to get eye point in Sky::ScreenPtHitsSky
Diffstat (limited to 'dev/a6-harold')
-rw-r--r--dev/a6-harold/sky.cc5
1 files changed, 5 insertions, 0 deletions
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;
}