Rename `Tetrahedron` to prepare for new struct

This commit is contained in:
Hanno Braun 2023-05-04 12:11:01 +02:00
parent bd9ae22aea
commit eaaa89793b
4 changed files with 9 additions and 9 deletions

View File

@ -8,6 +8,6 @@ pub use self::{
cycle::BuildCycle,
edge::BuildHalfEdge,
face::{BuildFace, Polygon},
shell::{BuildShell, Tetrahedron},
shell::{BuildShell, TetrahedronShell},
surface::BuildSurface,
};

View File

@ -33,7 +33,7 @@ pub trait BuildShell {
fn tetrahedron(
points: [impl Into<Point<3>>; 4],
services: &mut Services,
) -> Tetrahedron {
) -> TetrahedronShell {
let [a, b, c, d] = points.map(Into::into);
let abc = Face::triangle([a, b, c], services);
@ -66,7 +66,7 @@ pub trait BuildShell {
let [abc, bad, dac, cbd] = triangles;
Tetrahedron {
TetrahedronShell {
shell,
abc,
bad,
@ -85,7 +85,7 @@ impl BuildShell for Shell {}
/// `d`, in the order in which they are passed.
///
/// Returned by [`BuildShell::tetrahedron`].
pub struct Tetrahedron<I: IsInserted = IsInsertedNo> {
pub struct TetrahedronShell<I: IsInserted = IsInsertedNo> {
/// The shell that forms the tetrahedron
pub shell: I::T<Shell>,

View File

@ -7,7 +7,7 @@ use crate::{
storage::Handle,
};
use super::{Polygon, Tetrahedron};
use super::{Polygon, TetrahedronShell};
/// Insert an object into its respective store
///
@ -92,11 +92,11 @@ impl<const D: usize> Insert for Polygon<D, IsInsertedNo> {
}
}
impl Insert for Tetrahedron<IsInsertedNo> {
type Inserted = Tetrahedron<IsInsertedYes>;
impl Insert for TetrahedronShell<IsInsertedNo> {
type Inserted = TetrahedronShell<IsInsertedYes>;
fn insert(self, services: &mut Services) -> Self::Inserted {
Tetrahedron {
TetrahedronShell {
shell: self.shell.insert(services),
abc: self.abc,
bad: self.bad,

View File

@ -8,7 +8,7 @@ mod update;
pub use self::{
build::{
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSurface,
Polygon, Tetrahedron,
Polygon, TetrahedronShell,
},
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
join::JoinCycle,