mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 11:58:27 +00:00
Simplify imports
This commit is contained in:
parent
2e3784efbf
commit
27d1b71100
@ -1,6 +1,6 @@
|
|||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
|
|
||||||
use fj_math::{Aabb, Point};
|
use fj_math::{Aabb, Point, Triangle};
|
||||||
|
|
||||||
use crate::Color;
|
use crate::Color;
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ impl TriMesh {
|
|||||||
/// Add a triangle to the mesh
|
/// Add a triangle to the mesh
|
||||||
pub fn push_triangle(
|
pub fn push_triangle(
|
||||||
&mut self,
|
&mut self,
|
||||||
triangle: impl Into<fj_math::Triangle<3>>,
|
triangle: impl Into<Triangle<3>>,
|
||||||
color: Color,
|
color: Color,
|
||||||
) {
|
) {
|
||||||
let triangle = triangle.into();
|
let triangle = triangle.into();
|
||||||
@ -49,10 +49,7 @@ impl TriMesh {
|
|||||||
///
|
///
|
||||||
/// Returns true, if a triangle with any combination of the provided points
|
/// Returns true, if a triangle with any combination of the provided points
|
||||||
/// is part of the mesh.
|
/// is part of the mesh.
|
||||||
pub fn contains_triangle(
|
pub fn contains_triangle(&self, triangle: impl Into<Triangle<3>>) -> bool {
|
||||||
&self,
|
|
||||||
triangle: impl Into<fj_math::Triangle<3>>,
|
|
||||||
) -> bool {
|
|
||||||
let triangle = triangle.into().normalize();
|
let triangle = triangle.into().normalize();
|
||||||
|
|
||||||
for t in &self.triangles {
|
for t in &self.triangles {
|
||||||
@ -92,7 +89,7 @@ impl TriMesh {
|
|||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
|
||||||
pub struct MeshTriangle {
|
pub struct MeshTriangle {
|
||||||
/// The points of the triangle
|
/// The points of the triangle
|
||||||
pub inner: fj_math::Triangle<3>,
|
pub inner: Triangle<3>,
|
||||||
|
|
||||||
/// The color of the triangle
|
/// The color of the triangle
|
||||||
pub color: Color,
|
pub color: Color,
|
||||||
|
Loading…
Reference in New Issue
Block a user