mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 02:48:27 +00:00
Inline redundant method
This commit is contained in:
parent
803115c89c
commit
5fe9676949
@ -3,7 +3,7 @@
|
||||
mod delaunay;
|
||||
mod polygon;
|
||||
|
||||
use fj_interop::TriMesh;
|
||||
use fj_interop::{MeshTriangle, TriMesh};
|
||||
|
||||
use crate::{Core, geometry::Tolerance, operations::presentation::GetColor};
|
||||
|
||||
@ -68,7 +68,10 @@ impl Triangulate for FaceApprox {
|
||||
|
||||
for triangle in triangles {
|
||||
let points = triangle.map(|point| point.point_global);
|
||||
mesh.push_triangle(points, color);
|
||||
mesh.triangles.push(MeshTriangle {
|
||||
inner: points.into(),
|
||||
color,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,18 +17,6 @@ impl TriMesh {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
/// Add a triangle to the mesh
|
||||
pub fn push_triangle(
|
||||
&mut self,
|
||||
triangle: impl Into<Triangle<3>>,
|
||||
color: Color,
|
||||
) {
|
||||
self.triangles.push(MeshTriangle {
|
||||
inner: triangle.into(),
|
||||
color,
|
||||
});
|
||||
}
|
||||
|
||||
/// Determine whether the mesh contains the provided triangle
|
||||
///
|
||||
/// Returns true, if a triangle with any combination of the provided points
|
||||
|
Loading…
Reference in New Issue
Block a user