Add `MaybePartial<SurfaceVertex>::global_form`

This commit is contained in:
Hanno Braun 2022-11-08 13:42:26 +01:00
parent 41b32978b7
commit 5b0b4237cc
1 changed files with 8 additions and 0 deletions

View File

@ -224,6 +224,14 @@ impl MaybePartial<SurfaceVertex> {
Self::Partial(partial) => partial.surface(), Self::Partial(partial) => partial.surface(),
} }
} }
/// Access the global form
pub fn global_form(&self) -> MaybePartial<GlobalVertex> {
match self {
Self::Full(full) => full.global_form().clone().into(),
Self::Partial(partial) => partial.global_form(),
}
}
} }
impl MaybePartial<Vertex> { impl MaybePartial<Vertex> {