mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-15 12:47:19 +00:00
Merge pull request #1219 from hannobraun/half-edge
Add methods to access single `HalfEdge` vertices
This commit is contained in:
commit
a6091e81f4
@ -79,6 +79,18 @@ impl HalfEdge {
|
|||||||
&self.vertices
|
&self.vertices
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Access the vertex at the back of the half-edge
|
||||||
|
pub fn back(&self) -> &Vertex {
|
||||||
|
let [back, _] = self.vertices();
|
||||||
|
back
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Access the vertex at the front of the half-edge
|
||||||
|
pub fn front(&self) -> &Vertex {
|
||||||
|
let [_, front] = self.vertices();
|
||||||
|
front
|
||||||
|
}
|
||||||
|
|
||||||
/// Access the global form of this half-edge
|
/// Access the global form of this half-edge
|
||||||
pub fn global_form(&self) -> &GlobalEdge {
|
pub fn global_form(&self) -> &GlobalEdge {
|
||||||
&self.global_form
|
&self.global_form
|
||||||
|
@ -185,7 +185,7 @@ impl PartialCycle {
|
|||||||
|
|
||||||
half_edge
|
half_edge
|
||||||
.with_surface(Some(surface_for_edges.clone()))
|
.with_surface(Some(surface_for_edges.clone()))
|
||||||
.with_from_vertex(from)
|
.with_back_vertex(from)
|
||||||
})
|
})
|
||||||
.into_full(objects);
|
.into_full(objects);
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ impl PartialHalfEdge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Update the partial half-edge with the given from vertex
|
/// Update the partial half-edge with the given from vertex
|
||||||
pub fn with_from_vertex(
|
pub fn with_back_vertex(
|
||||||
mut self,
|
mut self,
|
||||||
vertex: Option<impl Into<MaybePartial<Vertex>>>,
|
vertex: Option<impl Into<MaybePartial<Vertex>>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
@ -73,7 +73,7 @@ impl PartialHalfEdge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Update the partial half-edge with the given from vertex
|
/// Update the partial half-edge with the given from vertex
|
||||||
pub fn with_to_vertex(
|
pub fn with_front_vertex(
|
||||||
mut self,
|
mut self,
|
||||||
vertex: Option<impl Into<MaybePartial<Vertex>>>,
|
vertex: Option<impl Into<MaybePartial<Vertex>>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
Loading…
Reference in New Issue
Block a user