Mercurial > gemma
comparison cmd/octree2contour/main.go @ 678:7bb961d750b6 octree
octree: traverse horizontally over tree to find out which triangles to process.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 19 Sep 2018 17:34:19 +0200 |
parents | 120a82bd9953 |
children | c79c7be29a7a |
comparison
equal
deleted
inserted
replaced
675:1cb565d244cf | 678:7bb961d750b6 |
---|---|
11 step = flag.Float64("s", 0.5, "step with") | 11 step = flag.Float64("s", 0.5, "step with") |
12 max = flag.Float64("m", 10, "max height from lowest poiint") | 12 max = flag.Float64("m", 10, "max height from lowest poiint") |
13 ) | 13 ) |
14 | 14 |
15 func process(tree *octree) { | 15 func process(tree *octree) { |
16 // TODO: Implement me! | 16 if *one { |
17 var triangles int | |
18 tree.horizontal(*step, func([]int32) { | |
19 triangles++ | |
20 }) | |
21 log.Printf("num triangles: %d\n", triangles) | |
22 } else { | |
23 } | |
17 } | 24 } |
18 | 25 |
19 func main() { | 26 func main() { |
20 flag.Parse() | 27 flag.Parse() |
21 | 28 |