Add BoundingVertices

This commit is contained in:
Hanno Braun 2023-07-18 10:55:08 +02:00
parent cb37ad3fd2
commit ee9196b4e0
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
use crate::{
objects::Vertex,
storage::{Handle, HandleWrapper},
};
/// The bounding vertices of an edge
#[derive(Eq, PartialEq)]
pub struct BoundingVertices {
/// The bounding vertices
pub inner: [HandleWrapper<Vertex>; 2],
}
impl From<[Handle<Vertex>; 2]> for BoundingVertices {
fn from(vertices: [Handle<Vertex>; 2]) -> Self {
Self {
inner: vertices.map(Into::into),
}
}
}

View File

@ -1,11 +1,13 @@
//! Types that are tied to objects, but aren't objects themselves
mod boundary;
mod bounding_vertices;
mod path;
mod surface;
pub use self::{
boundary::BoundaryOnCurve,
bounding_vertices::BoundingVertices,
path::{GlobalPath, SurfacePath},
surface::SurfaceGeometry,
};