comparison pkg/mesh/vertex.go @ 5418:e89ff1894bb4 marking-single-beam

Don't clip the points against the border polygon. The implemented way was wrong.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 07 Jul 2021 18:27:40 +0200
parents 31b0e865e7a0
children 202715173935
comparison
equal deleted inserted replaced
5417:2d294ad81241 5418:e89ff1894bb4
1132 } 1132 }
1133 1133
1134 return out 1134 return out
1135 } 1135 }
1136 1136
1137 // All returns all points as an iterator.
1138 func (mpz MultiPointZ) All() func() (Vertex, bool) {
1139 var idx int
1140 return func() (v Vertex, ok bool) {
1141 if idx >= len(mpz) {
1142 ok = false
1143 return
1144 }
1145 v, ok = mpz[idx], true
1146 idx++
1147 return
1148 }
1149 }
1150
1137 // FilterRemoved returns an iterator that only delivers the vertices 1151 // FilterRemoved returns an iterator that only delivers the vertices
1138 // which indices are not marked as removed. 1152 // which indices are not marked as removed.
1139 func (mpz MultiPointZ) FilterRemoved(removed map[int32]struct{}) func() (Vertex, bool) { 1153 func (mpz MultiPointZ) FilterRemoved(removed map[int32]struct{}) func() (Vertex, bool) {
1140 var idx int32 1154 var idx int32
1141 return func() (v Vertex, ok bool) { 1155 return func() (v Vertex, ok bool) {