pub struct Topology {
pub directed: HashMap<(usize, usize), (usize, usize)>,
pub fans: Vec<(Vec<(usize, usize)>, bool)>,
}Expand description
How the faces of a mesh fit together: which face runs along each directed edge, and the faces around each vertex in order.
Fields§
§directed: HashMap<(usize, usize), (usize, usize)>(a, b): the face that runs from a to b, and the corner of it
at a.
fans: Vec<(Vec<(usize, usize)>, bool)>Per vertex: the faces around it, each with its corner there, in order — each next one across the edge to the previous one’s preceding corner — and whether they close up all round, rather than meeting the mesh’s boundary on both ends.
Implementations§
Source§impl Topology
impl Topology
Sourcepub fn new(
vertex_count: usize,
faces: &[Vec<usize>],
vertex_names: &[String],
face_names: &[String],
) -> GeopResult<Self>
pub fn new( vertex_count: usize, faces: &[Vec<usize>], vertex_names: &[String], face_names: &[String], ) -> GeopResult<Self>
The topology of faces over vertex_count vertices. Fails, naming
the elements with vertex_names and face_names, for a mesh no
limit surface can be built from: a face of fewer than three
vertices, or through one twice; faces turned against each other
(an edge run the same way twice), or more than two meeting at an
edge; faces around a vertex that do not make one fan; a vertex of no
face; an inner vertex of fewer than three faces.
Sourcepub fn is_boundary(&self, a: usize, b: usize) -> bool
pub fn is_boundary(&self, a: usize, b: usize) -> bool
Whether only one face runs along the edge between a and b.