Mercurial > gemma
diff cmd/octree2contour/octree.go @ 726:5af9ab39e715
Renamed a few types to uppercase names to prepare the move to the octree package.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sat, 22 Sep 2018 21:34:12 +0200 |
parents | 9db4ae29ded9 |
children |
line wrap: on
line diff
--- a/cmd/octree2contour/octree.go Sat Sep 22 09:55:42 2018 +0200 +++ b/cmd/octree2contour/octree.go Sat Sep 22 21:34:12 2018 +0200 @@ -4,18 +4,18 @@ "math" ) -type octree struct { - epsg uint32 +type Octree struct { + EPSG uint32 - vertices []vertex + vertices []Vertex triangles [][]int32 index []int32 - min vertex - max vertex + Min Vertex + Max Vertex } -func (ot *octree) horizontal(h float64, fn func(*triangle)) { +func (ot *Octree) Horizontal(h float64, fn func(*Triangle)) { type frame struct { pos int32 @@ -23,11 +23,11 @@ max float64 } - if h < ot.min.z || ot.max.z < h { + if h < ot.Min.z || ot.Max.z < h { return } - stack := []frame{{1, ot.min.z, ot.max.z}} + stack := []frame{{1, ot.Min.z, ot.Max.z}} dupes := map[int32]struct{}{} @@ -64,7 +64,7 @@ continue } tri := ot.triangles[idx] - t := triangle{ + t := Triangle{ ot.vertices[tri[0]], ot.vertices[tri[1]], ot.vertices[tri[2]],