Skip to content

Commit

Permalink
Remove unused conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jun 6, 2023
1 parent 07f3ab2 commit 5b748ea
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions crates/fj-viewer/src/graphics/vertices.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use bytemuck::{Pod, Zeroable};
use fj_interop::{
debug::DebugInfo,
mesh::{Index, Mesh},
};
use fj_interop::mesh::{Index, Mesh};
use fj_math::{Point, Vector};

#[derive(Debug)]
Expand Down Expand Up @@ -102,36 +99,6 @@ impl From<&Mesh<fj_math::Point<3>>> for Vertices {
}
}

impl From<&DebugInfo> for Vertices {
fn from(debug_info: &DebugInfo) -> Self {
let mut self_ = Self::empty();

for triangle_edge_check in &debug_info.triangle_edge_checks {
let normal = [0.; 3];

let red = [1., 0., 0., 1.];
let green = [0., 1., 0., 1.];

let color = if triangle_edge_check.hits.len() % 2 == 0 {
red
} else {
green
};

self_.push_cross(triangle_edge_check.origin, normal, color);

for &hit in &triangle_edge_check.hits {
let line = hit.points();
let color = [0., 0., 0., 1.];

self_.push_line(line, normal, color);
}
}

self_
}
}

#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
#[repr(C)]
pub struct Vertex {
Expand Down

0 comments on commit 5b748ea

Please sign in to comment.