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.
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.
Trait Implementations§
Source§impl Default for VertInterner
impl Default for VertInterner
Source§fn default() -> VertInterner
fn default() -> VertInterner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VertInterner
impl RefUnwindSafe for VertInterner
impl Send for VertInterner
impl Sync for VertInterner
impl Unpin for VertInterner
impl UnsafeUnpin for VertInterner
impl UnwindSafe for VertInterner
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