From e93eee4bb96bd2d81e422dc9d453da6138fd6ba2 Mon Sep 17 00:00:00 2001 From: Martin Lehoux Date: Sun, 5 Apr 2020 22:46:01 -0700 Subject: misc - Doc --- camera.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'camera.go') diff --git a/camera.go b/camera.go index 6575390..6cc3391 100644 --- a/camera.go +++ b/camera.go @@ -1,15 +1,17 @@ package main +// Camera handle view position and screen type Camera struct { - lower_left_corner Vec3D + lowerLeftCorner Vec3D origin, horizontal, vertical Vec3D } +// GetRay computes Ray given screen params func (camera Camera) GetRay(u float64, v float64) Ray { return Ray{ camera.origin, AddVec3D(AddVec3D( - camera.lower_left_corner, + camera.lowerLeftCorner, ScalarProduct(u, camera.horizontal)), ScalarProduct(v, camera.vertical), ), -- cgit v1.3