pub struct PatchField2 {
pub u_breaks: Vec<Scalar>,
pub v_breaks: Vec<Scalar>,
pub u_degree: usize,
pub v_degree: usize,
pub patches: Vec<Vec<Scalar>>,
}Expand description
A piecewise polynomial field: on each cell of the grid of u_breaks by
v_breaks, a tensor-product Bernstein polynomial of degree
(u_degree, v_degree) in the cell’s local coordinates s, t in
[0, 1]. Its coefficients bound it (the convex hull property), which is
what makes a trace on it certified.
Fields§
§u_breaks: Vec<Scalar>Cell boundaries along u, increasing.
v_breaks: Vec<Scalar>Cell boundaries along v, increasing.
u_degree: usizeDegree along u.
v_degree: usizeDegree along v.
patches: Vec<Vec<Scalar>>Per cell (index i * (v_breaks.len() - 1) + j for cell i along u
and j along v), the coefficients, index a * (v_degree + 1) + b.
Implementations§
Source§impl PatchField2
impl PatchField2
Sourcepub fn jet(&self, p: Point2) -> Jet2
pub fn jet(&self, p: Point2) -> Jet2
Value, gradient and Hessian at p; beyond the grid, the nearest
edge cell’s polynomial continued.
Sourcepub fn magnitude(&self) -> Scalar
pub fn magnitude(&self) -> Scalar
The largest coefficient: a bound on the field’s size (convex hull).
Trait Implementations§
Source§impl Clone for PatchField2
impl Clone for PatchField2
Source§fn clone(&self) -> PatchField2
fn clone(&self) -> PatchField2
Returns a copy 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 PatchField2
impl Debug for PatchField2
Source§impl PartialEq for PatchField2
impl PartialEq for PatchField2
impl StructuralPartialEq for PatchField2
Auto Trait Implementations§
impl Freeze for PatchField2
impl RefUnwindSafe for PatchField2
impl Send for PatchField2
impl Sync for PatchField2
impl Unpin for PatchField2
impl UnwindSafe for PatchField2
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