MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / half_edge

Method half_edge

splashsurf_lib/src/halfedge_mesh.rs:134–147  ·  view source on GitHub ↗

Returns the half-edge between the "from" and "to" vertex if it exists in the mesh

(&self, from: usize, to: usize)

Source from the content-addressed store, hash-verified

132
133 /// Returns the half-edge between the "from" and "to" vertex if it exists in the mesh
134 pub fn half_edge(&self, from: usize, to: usize) -> Option<HalfEdge> {
135 let from_edges = self
136 .vertex_half_edge_map
137 .get(from)
138 .expect("vertex must be part of the mesh");
139 for &he_idx in from_edges {
140 let he = &self.half_edges[he_idx];
141 if he.to == to {
142 return Some(*he);
143 }
144 }
145
146 None
147 }
148
149 /// Returns whether the given half-edge or its opposite half-edge is a boundary edge
150 pub fn is_boundary_edge(&self, half_edge: HalfEdge) -> bool {

Callers 7

is_collapse_okMethod · 0.80
fromMethod · 0.80
marching_cubes_cleanupFunction · 0.80
process_collapse_queueFunction · 0.80
test_halfedge_icoFunction · 0.80
test_halfedge_planeFunction · 0.80

Calls 1

getMethod · 0.45

Tested by 2

test_halfedge_icoFunction · 0.64
test_halfedge_planeFunction · 0.64