comparison cmd/octree2contour/vertex.go @ 718:c0bba602b60e octree

octree: define a type for LineStringZ.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 21 Sep 2018 14:47:44 +0200
parents 614135d69823
children 5af9ab39e715
comparison
equal deleted inserted replaced
708:fdd88e95bae7 718:c0bba602b60e
97 return +1 97 return +1
98 } 98 }
99 return 0 99 return 0
100 } 100 }
101 101
102 func (t *triangle) intersectH(h float64) []vertex { 102 func (t *triangle) intersectH(h float64) lineStringZ {
103 sides := [3]int{ 103 sides := [3]int{
104 side(t[0].z, h), 104 side(t[0].z, h),
105 side(t[1].z, h), 105 side(t[1].z, h),
106 side(t[2].z, h), 106 side(t[2].z, h),
107 } 107 }
108 108
109 var points []vertex 109 var points lineStringZ
110 110
111 for i := 0; i < 3; i++ { 111 for i := 0; i < 3; i++ {
112 j := (i + 1) % 3 112 j := (i + 1) % 3
113 si := sides[i] 113 si := sides[i]
114 sj := sides[j] 114 sj := sides[j]