Struct oxygengine_animation::spline::Spline
source · [−]pub struct Spline<T>where
T: Default + Clone + Curved + CurvedChange,{ /* private fields */ }
Implementations
sourceimpl<T> Spline<T>where
T: Default + Clone + Curved + CurvedChange,
impl<T> Spline<T>where
T: Default + Clone + Curved + CurvedChange,
pub fn new(points: Vec<SplinePoint<T>>) -> Result<Self, SplineError>
pub fn linear(from: T, to: T) -> Result<Self, SplineError>
pub fn point(point: T) -> Result<Self, SplineError>
pub fn value_along_axis_iter(
&self,
steps: usize,
axis_index: usize
) -> Option<impl Iterator<Item = Scalar>>
pub fn sample(&self, factor: Scalar) -> T
pub fn sample_along_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<T>
pub fn sample_direction(&self, factor: Scalar) -> T
pub fn sample_direction_along_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<T>
pub fn sample_tangent(&self, factor: Scalar) -> T
pub fn sample_tangent_along_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<T>
pub fn length(&self) -> Scalar
pub fn points(&self) -> &[SplinePoint<T>]
pub fn set_points(&mut self, points: Vec<SplinePoint<T>>)
pub fn curves(&self) -> &[Curve<T>]
pub fn find_curve_index_factor(&self, factor: Scalar) -> (usize, Scalar)
pub fn find_curve_index_by_axis_value(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<usize>
pub fn find_time_for_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<Scalar>
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Spline<T>where
T: Default + Clone + Curved + CurvedChange,
T: Serialize + DeserializeOwned,
impl<'de, T> Deserialize<'de> for Spline<T>where
T: Default + Clone + Curved + CurvedChange,
T: Serialize + DeserializeOwned,
sourcefn 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
sourceimpl<T> Serialize for Spline<T>where
T: Default + Clone + Curved + CurvedChange,
T: Serialize + DeserializeOwned,
impl<T> Serialize for Spline<T>where
T: Default + Clone + Curved + CurvedChange,
T: Serialize + DeserializeOwned,
Auto Trait Implementations
impl<T> RefUnwindSafe for Spline<T>where
T: RefUnwindSafe,
impl<T> Send for Spline<T>where
T: Send,
impl<T> Sync for Spline<T>where
T: Sync,
impl<T> Unpin for Spline<T>where
T: Unpin,
impl<T> UnwindSafe for Spline<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more