pub struct PatchField2 {
pub u_breaks: Vec<f64>,
pub v_breaks: Vec<f64>,
pub u_degree: usize,
pub v_degree: usize,
pub patches: Vec<Vec<f64>>,
}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<f64>Cell boundaries along u, increasing.
v_breaks: Vec<f64>Cell boundaries along v, increasing.
u_degree: usizeDegree along u.
v_degree: usizeDegree along v.
patches: Vec<Vec<f64>>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: DVec2) -> Jet2
pub fn jet(&self, p: DVec2) -> Jet2
Value, gradient and Hessian at p; beyond the grid, the nearest
edge cell’s polynomial continued.
Sourcepub fn magnitude(&self) -> f64
pub fn magnitude(&self) -> f64
The largest coefficient: a bound on the field’s size (convex hull).
Sourcepub fn bound(&self, cell: &Cell) -> Range
pub fn bound(&self, cell: &Cell) -> Range
A bound over the box: the hull of every overlapping cell’s coefficients restricted to the box.
Sourcepub fn partial(&self, along_u: bool) -> PatchField2
pub fn partial(&self, along_u: bool) -> PatchField2
The partial derivative along u (along_u) or v, in the same
cells, one degree lower along that axis.
Trait Implementations§
Source§impl Clone for PatchField2
impl Clone for PatchField2
Source§fn clone(&self) -> PatchField2
fn clone(&self) -> PatchField2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more