summaryrefslogtreecommitdiff
path: root/geometry.go
diff options
context:
space:
mode:
Diffstat (limited to 'geometry.go')
-rw-r--r--geometry.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/geometry.go b/geometry.go
index 3c3ba83..04896dc 100644
--- a/geometry.go
+++ b/geometry.go
@@ -4,16 +4,12 @@ package main
// representation of a three-dimensional point in space
type Point struct {
- x float32
- y float32
- z float32
+ scalars [3]float32 // x = scalars[0], y = scalars[1], z = scalars[2]
}
// a triangle consists of three points
type Triangle struct {
- a *Point
- b *Point
- c *Point
+ points [3]*Point
}
// a surface is made of a slice of triangles