diff options
Diffstat (limited to 'geometry.go')
-rw-r--r-- | geometry.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/geometry.go b/geometry.go index 80420a6..fdbbcef 100644 --- a/geometry.go +++ b/geometry.go @@ -6,22 +6,23 @@ import ( "github.com/go-gl/mathgl/mgl32" ) -// representation of a three-dimensional point in space +// Point represents a three-dimensional point in space. type Point struct { scalars [3]float32 // x = scalars[0], y = scalars[1], z = scalars[2] } -// a triangle consists of three points +// Triangle is a geometrical triangle defined by three points. type Triangle struct { points [3]*Point } -// a surface is made of a slice of triangles +// Surface is a slice of triangles. type Surface struct { triangles []*Triangle } -// return a transformation to view the whole centered surface +// getHomeView returns a transformation which shows the given Surface in the +// center of the window. func (s Surface) getHomeView() mgl32.Mat4 { // evaluating the smallest and biggest values for x,y,z of the surface |