MCPcopy Create free account
hub / github.com/Notgnoshi/generative / triangle_points

Method triangle_points

generative/triangulation.rs:38–50  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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()

Callers 2

trianglesMethod · 0.80
linesMethod · 0.80

Calls 1

triangle_indicesMethod · 0.80

Tested by

no test coverage detected