pub struct VertexSplit {
pub vertex_s: usize,
pub vertex_t: usize,
pub position_s: Point3f,
pub position_t: Point3f,
pub normal_s: Option<Vector3f>,
pub normal_t: Option<Vector3f>,
pub color_s: Option<[u8; 3]>,
pub color_t: Option<[u8; 3]>,
pub face_left: Option<[usize; 3]>,
pub face_right: Option<[usize; 3]>,
pub modified_faces: Vec<(usize, [usize; 3])>,
}Expand description
A single vertex split operation (inverse of an edge collapse).
Records how to split vertex vertex_s into vertex_s (at updated position)
and vertex_t (a restored vertex), along with the face connectivity changes
needed to reverse the collapse.
Fields§
§vertex_s: usizeVertex being split (the survivor of the original collapse)
vertex_t: usizeRestored vertex index (the vertex that was removed in the collapse)
position_s: Point3fPosition of vertex_s after the split
position_t: Point3fPosition of vertex_t (restored)
normal_s: Option<Vector3f>Normal of vertex_s after split
normal_t: Option<Vector3f>Normal of vertex_t (restored)
color_s: Option<[u8; 3]>Color of vertex_s after split
color_t: Option<[u8; 3]>Color of vertex_t (restored)
face_left: Option<[usize; 3]>Restored face on left side of the edge (if any)
face_right: Option<[usize; 3]>Restored face on right side of the edge (if any)
modified_faces: Vec<(usize, [usize; 3])>Faces whose connectivity changes: (face_index, new vertex indices)
Trait Implementations§
Source§impl Clone for VertexSplit
impl Clone for VertexSplit
Source§fn clone(&self) -> VertexSplit
fn clone(&self) -> VertexSplit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VertexSplit
impl Debug for VertexSplit
Source§impl<'de> Deserialize<'de> for VertexSplit
impl<'de> Deserialize<'de> for VertexSplit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VertexSplit
impl RefUnwindSafe for VertexSplit
impl Send for VertexSplit
impl Sync for VertexSplit
impl Unpin for VertexSplit
impl UnsafeUnpin for VertexSplit
impl UnwindSafe for VertexSplit
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.