pub struct KnotVector {
pub knots: Vec<f64>,
pub degree: usize,
}Fields§
§knots: Vec<f64>§degree: usizeImplementations§
Source§impl KnotVector
impl KnotVector
pub fn new(knots: Vec<f64>, degree: usize) -> Result<Self, String>
pub fn control_point_count(&self) -> usize
pub fn domain(&self) -> [f64; 2]
pub fn clamp_param(&self, parameter: f64) -> f64
pub fn find_span(&self, parameter: f64) -> usize
pub fn basis_functions(&self, span: usize, parameter: f64) -> Vec<f64>
pub fn basis_derivatives( &self, span: usize, parameter: f64, derivative_count: usize, ) -> Vec<Vec<f64>>
Trait Implementations§
Source§impl Clone for KnotVector
impl Clone for KnotVector
Source§fn clone(&self) -> KnotVector
fn clone(&self) -> KnotVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KnotVector
impl Debug for KnotVector
Source§impl<'de> Deserialize<'de> for KnotVector
impl<'de> Deserialize<'de> for KnotVector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KnotVector
impl RefUnwindSafe for KnotVector
impl Send for KnotVector
impl Sync for KnotVector
impl Unpin for KnotVector
impl UnsafeUnpin for KnotVector
impl UnwindSafe for KnotVector
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