mirror of
https://github.com/hannobraun/Fornjot
synced 2025-03-02 19:15:49 +00:00
Remove DebugInfo
Debug information hasn't been generated in a while.
This commit is contained in:
parent
d478f9c5db
commit
6d735f9c11
@ -1,50 +0,0 @@
|
||||
//! Debug information definitions for the Fornjot ecosystem
|
||||
//!
|
||||
//! Defines debug information that is used by other crates within the Fornjot
|
||||
//! ecosystem. The types in here aren't very useful in themselves, but they
|
||||
//! define an interface that other crates use to communicate between each other.
|
||||
|
||||
use fj_math::{Point, Segment};
|
||||
|
||||
/// Debug info from the CAD kernel that can be visualized
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DebugInfo {
|
||||
/// Rays being used during face triangulation
|
||||
pub triangle_edge_checks: Vec<TriangleEdgeCheck>,
|
||||
}
|
||||
|
||||
impl DebugInfo {
|
||||
/// Construct an empty instance of `DebugInfo`
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
/// Clear all information within this instance
|
||||
///
|
||||
/// The resulting instance is the same, as if created by [`DebugInfo::new`],
|
||||
/// but calling `clear` might be more efficient in regard to heap
|
||||
/// allocations.
|
||||
pub fn clear(&mut self) {
|
||||
self.triangle_edge_checks.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// Record of a check to determine if a triangle edge is within a face
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TriangleEdgeCheck {
|
||||
/// The origin of the ray used to perform the check
|
||||
pub origin: Point<3>,
|
||||
|
||||
/// The points where the ray hit edges of the face
|
||||
pub hits: Vec<Segment<3>>,
|
||||
}
|
||||
|
||||
impl TriangleEdgeCheck {
|
||||
/// Construct a new instance
|
||||
pub fn new(origin: Point<3>) -> Self {
|
||||
Self {
|
||||
origin,
|
||||
hits: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,6 @@
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
pub mod debug;
|
||||
pub mod ext;
|
||||
pub mod mesh;
|
||||
pub mod processed_shape;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use fj_math::{Aabb, Point};
|
||||
|
||||
use crate::{debug::DebugInfo, mesh::Mesh};
|
||||
use crate::mesh::Mesh;
|
||||
|
||||
/// A processed shape
|
||||
#[derive(Clone, Debug)]
|
||||
@ -12,7 +12,4 @@ pub struct ProcessedShape {
|
||||
|
||||
/// The triangle mesh that approximates the original shape
|
||||
pub mesh: Mesh<Point<3>>,
|
||||
|
||||
/// The debug info generated while processing the shape
|
||||
pub debug_info: DebugInfo,
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
use fj_interop::{
|
||||
debug::DebugInfo, mesh::Mesh, processed_shape::ProcessedShape,
|
||||
};
|
||||
use fj_interop::{mesh::Mesh, processed_shape::ProcessedShape};
|
||||
use fj_math::{Aabb, Point};
|
||||
use fj_viewer::{
|
||||
InputEvent, NormalizedScreenPosition, RendererInitError, Screen,
|
||||
@ -27,7 +25,6 @@ pub fn display(mesh: Mesh<Point<3>>, invert_zoom: bool) -> Result<(), Error> {
|
||||
viewer.handle_shape_update(ProcessedShape {
|
||||
aabb: Aabb::<3>::from_points(mesh.vertices()),
|
||||
mesh,
|
||||
debug_info: DebugInfo::new(),
|
||||
});
|
||||
|
||||
let mut held_mouse_button = None;
|
||||
|
Loading…
Reference in New Issue
Block a user