Remove PartialVertex::surface_form

This commit is contained in:
Hanno Braun 2022-11-11 15:54:18 +01:00
parent 3bfb5f6da8
commit b71665a895
5 changed files with 5 additions and 10 deletions

View File

@ -14,9 +14,9 @@ impl TransformObject for PartialVertex {
transform: &Transform,
objects: &Objects,
) -> Result<Self, ValidationError> {
let curve = self.curve.clone().transform(transform, objects)?;
let curve = self.curve.transform(transform, objects)?;
let surface_form = self
.surface_form()
.surface_form
.into_partial()
.transform(transform, objects)?;

View File

@ -201,7 +201,7 @@ impl HalfEdgeBuilder for PartialHalfEdge {
.map(|(vertex, global_form)| {
vertex.update_partial(|vertex| {
vertex.clone().with_surface_form(
vertex.surface_form().update_partial(
vertex.surface_form.update_partial(
|mut surface_vertex| {
if let Some(global_form) = global_form {
surface_vertex.global_form =

View File

@ -243,7 +243,7 @@ impl MaybePartial<Vertex> {
pub fn surface_form(&self) -> MaybePartial<SurfaceVertex> {
match self {
Self::Full(full) => full.surface_form().clone().into(),
Self::Partial(partial) => partial.surface_form(),
Self::Partial(partial) => partial.surface_form.clone(),
}
}
}

View File

@ -55,7 +55,7 @@ impl PartialHalfEdge {
self.vertices = self.vertices.map(|vertex| {
vertex.update_partial(|vertex| {
let surface_form = vertex.surface_form().update_partial(
let surface_form = vertex.surface_form.clone().update_partial(
|mut surface_vertex| {
surface_vertex.surface = Some(surface.clone());
surface_vertex

View File

@ -24,11 +24,6 @@ pub struct PartialVertex {
}
impl PartialVertex {
/// Access the surface form of the [`Vertex`]
pub fn surface_form(&self) -> MaybePartial<SurfaceVertex> {
self.surface_form.clone()
}
/// Provide a position for the partial vertex
pub fn with_position(
mut self,