diff options
| author | Martin Lehoux <martin@lehoux.net> | 2020-04-05 22:46:01 -0700 |
|---|---|---|
| committer | Martin Lehoux <martin@lehoux.net> | 2020-04-05 22:46:01 -0700 |
| commit | e93eee4bb96bd2d81e422dc9d453da6138fd6ba2 (patch) | |
| tree | 0ef600be27a5bcde32d04283563c7b9fb8dd50d5 /camera.go | |
| parent | 8730659596dbfdb9625c0fc413625b261f7d6d70 (diff) | |
misc - Doc
Diffstat (limited to 'camera.go')
| -rw-r--r-- | camera.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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), ), |
