(&self)
| 36 | } |
| 37 | |
| 38 | fn triangle_points(&self) -> impl Iterator<Item = (geo::Coord, geo::Coord, geo::Coord)> + '_ { |
| 39 | self.triangle_indices().map(|(a, b, c)| { |
| 40 | let a = &self.points[a]; |
| 41 | let b = &self.points[b]; |
| 42 | let c = &self.points[c]; |
| 43 | |
| 44 | ( |
| 45 | geo::coord! {x: a.x, y: a.y}, |
| 46 | geo::coord! {x: b.x, y: b.y}, |
| 47 | geo::coord! {x: c.x, y: c.y}, |
| 48 | ) |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | pub fn triangles(&self) -> impl Iterator<Item = geo::Triangle> + '_ { |
| 53 | self.triangle_points() |
no test coverage detected