pub struct Vertex {
pub outgoing_halfedge: Option<HalfedgeId>,
}
Expand description
A vertex is an corner point of a face.
Fields§
§outgoing_halfedge: Option<HalfedgeId>
One of the halfedges with this vertex as start point. If possible this is a boundary halfedge, i.e. it has no associated face.
After the mesh graph is constructed correctly, this is always Some
.
Implementations§
Source§impl Vertex
impl Vertex
Sourcepub fn incoming_halfedge(&self, mesh_graph: &MeshGraph) -> HalfedgeId
pub fn incoming_halfedge(&self, mesh_graph: &MeshGraph) -> HalfedgeId
One of the incoming halfedges of this vertex.
Sourcepub fn outgoing_halfedge(&self) -> HalfedgeId
pub fn outgoing_halfedge(&self) -> HalfedgeId
One of the outgoing halfedges of this vertex.
Sourcepub fn outgoing_halfedges(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
pub fn outgoing_halfedges(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
Returns all halfedges that point away from this vertex.
Sourcepub fn incoming_halfedges(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
pub fn incoming_halfedges(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
Returns all halfedges that point towards this vertex
Sourcepub fn faces(&self, mesh_graph: &MeshGraph) -> Vec<FaceId>
pub fn faces(&self, mesh_graph: &MeshGraph) -> Vec<FaceId>
Returns all faces incident to this vertex.
Sourcepub fn neighbours(&self, mesh_graph: &MeshGraph) -> Vec<VertexId>
pub fn neighbours(&self, mesh_graph: &MeshGraph) -> Vec<VertexId>
Returns all neighbouring (connected through an edge) vertices of this vertex.
Sourcepub fn degree(&self, mesh_graph: &MeshGraph) -> usize
pub fn degree(&self, mesh_graph: &MeshGraph) -> usize
The degree of this vertex, i.e., the number of edges incident to it. Sometimes called the valence.
pub fn is_boundary(&self, mesh_graph: &MeshGraph) -> bool
Sourcepub fn one_ring(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
pub fn one_ring(&self, mesh_graph: &MeshGraph) -> Vec<HalfedgeId>
Returns the halfedges that are opposite to this vertex for every incident face to this vertex. They are ordered counterclockwise.
Trait Implementations§
impl Copy for Vertex
Auto Trait Implementations§
impl Freeze for Vertex
impl RefUnwindSafe for Vertex
impl Send for Vertex
impl Sync for Vertex
impl Unpin for Vertex
impl UnwindSafe for Vertex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.