pub struct VertInterner {
pub verts: Vec<R3>,
pub verts_f64: Vec<Vec3>,
/* private fields */
}Expand description
Exact-point interner: one id per distinct point, with two disjoint key
spaces. f64-representable points (all input vertices, and any constructed
point that rounds exactly) key on their coordinate bits — no rational
hashing, so untouched input triangles intern for the cost of a HashMap
probe. Only genuinely non-representable constructed points use the
rational map. verts_f64 caches the correctly rounded approximation of
every id (exact for bit-keyed points), which downstream float filters
and output assembly reuse instead of re-rounding.
Order invariance: both maps are probe-only (get/entry, never
iterated); ids come from verts.len() at insertion time, so they depend
only on the sequential call order, not on the hasher.
Fields§
§verts: Vec<R3>§verts_f64: Vec<Vec3>Implementations§
Source§impl VertInterner
impl VertInterner
Sourcepub fn intern_f64(&mut self, v: Vec3) -> u32
pub fn intern_f64(&mut self, v: Vec3) -> u32
Intern an exact-f64 point (input mesh vertices): zero rational work
on hits; one R3::from_vec3 on first sight, for the exact table.