mirror of https://github.com/hannobraun/Fornjot
Rename `Tetrahedron` to prepare for new struct
This commit is contained in:
parent
bd9ae22aea
commit
eaaa89793b
|
@ -8,6 +8,6 @@ pub use self::{
|
||||||
cycle::BuildCycle,
|
cycle::BuildCycle,
|
||||||
edge::BuildHalfEdge,
|
edge::BuildHalfEdge,
|
||||||
face::{BuildFace, Polygon},
|
face::{BuildFace, Polygon},
|
||||||
shell::{BuildShell, Tetrahedron},
|
shell::{BuildShell, TetrahedronShell},
|
||||||
surface::BuildSurface,
|
surface::BuildSurface,
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,7 @@ pub trait BuildShell {
|
||||||
fn tetrahedron(
|
fn tetrahedron(
|
||||||
points: [impl Into<Point<3>>; 4],
|
points: [impl Into<Point<3>>; 4],
|
||||||
services: &mut Services,
|
services: &mut Services,
|
||||||
) -> Tetrahedron {
|
) -> TetrahedronShell {
|
||||||
let [a, b, c, d] = points.map(Into::into);
|
let [a, b, c, d] = points.map(Into::into);
|
||||||
|
|
||||||
let abc = Face::triangle([a, b, c], services);
|
let abc = Face::triangle([a, b, c], services);
|
||||||
|
@ -66,7 +66,7 @@ pub trait BuildShell {
|
||||||
|
|
||||||
let [abc, bad, dac, cbd] = triangles;
|
let [abc, bad, dac, cbd] = triangles;
|
||||||
|
|
||||||
Tetrahedron {
|
TetrahedronShell {
|
||||||
shell,
|
shell,
|
||||||
abc,
|
abc,
|
||||||
bad,
|
bad,
|
||||||
|
@ -85,7 +85,7 @@ impl BuildShell for Shell {}
|
||||||
/// `d`, in the order in which they are passed.
|
/// `d`, in the order in which they are passed.
|
||||||
///
|
///
|
||||||
/// Returned by [`BuildShell::tetrahedron`].
|
/// Returned by [`BuildShell::tetrahedron`].
|
||||||
pub struct Tetrahedron<I: IsInserted = IsInsertedNo> {
|
pub struct TetrahedronShell<I: IsInserted = IsInsertedNo> {
|
||||||
/// The shell that forms the tetrahedron
|
/// The shell that forms the tetrahedron
|
||||||
pub shell: I::T<Shell>,
|
pub shell: I::T<Shell>,
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Polygon, Tetrahedron};
|
use super::{Polygon, TetrahedronShell};
|
||||||
|
|
||||||
/// Insert an object into its respective store
|
/// 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> {
|
impl Insert for TetrahedronShell<IsInsertedNo> {
|
||||||
type Inserted = Tetrahedron<IsInsertedYes>;
|
type Inserted = TetrahedronShell<IsInsertedYes>;
|
||||||
|
|
||||||
fn insert(self, services: &mut Services) -> Self::Inserted {
|
fn insert(self, services: &mut Services) -> Self::Inserted {
|
||||||
Tetrahedron {
|
TetrahedronShell {
|
||||||
shell: self.shell.insert(services),
|
shell: self.shell.insert(services),
|
||||||
abc: self.abc,
|
abc: self.abc,
|
||||||
bad: self.bad,
|
bad: self.bad,
|
||||||
|
|
|
@ -8,7 +8,7 @@ mod update;
|
||||||
pub use self::{
|
pub use self::{
|
||||||
build::{
|
build::{
|
||||||
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSurface,
|
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSurface,
|
||||||
Polygon, Tetrahedron,
|
Polygon, TetrahedronShell,
|
||||||
},
|
},
|
||||||
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
|
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
|
||||||
join::JoinCycle,
|
join::JoinCycle,
|
||||||
|
|
Loading…
Reference in New Issue