diff options
| author | Martin Lehoux <martin@lehoux.net> | 2020-04-04 14:49:42 -0700 |
|---|---|---|
| committer | Martin Lehoux <martin@lehoux.net> | 2020-04-04 14:49:42 -0700 |
| commit | a9983fb8d3d1ecf955c6fe4339bb36fd22153abb (patch) | |
| tree | 8049f957d2bf6d170bf7b9757846fe4a3ad4adcf | |
| parent | 658fd1f722932837901c11ae53eedf130ec662fd (diff) | |
feat - Basic Ray features
| -rw-r--r-- | ray.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,9 @@ +package main + +type Ray struct { + origin, direction Vec3D +} + +func (ray Ray) PointAt(time float64) Vec3D { + return AddVec3D(ray.origin, ScalarProduct(time, ray.direction)) +} |
