Struct oxygengine_animation::curve::Curve
source · pub struct Curve<T>where
T: Clone + Curved + CurvedChange,{ /* private fields */ }
Implementations§
source§impl<T> Curve<T>where
T: Clone + Curved + CurvedChange,
impl<T> Curve<T>where T: Clone + Curved + CurvedChange,
pub fn linear(from: T, to: T) -> Result<Self, CurveError>
pub fn bezier( from: T, from_param: T, to_param: T, to: T ) -> Result<Self, CurveError>
pub fn from(&self) -> &T
pub fn set_from(&mut self, value: T)
pub fn from_param(&self) -> &T
pub fn set_from_param(&mut self, value: T)
pub fn to_param(&self) -> &T
pub fn set_to_param(&mut self, value: T)
pub fn to(&self) -> &T
pub fn set_to(&mut self, value: T)
pub fn set(&mut self, from: T, from_param: T, to_param: T, to: T)
pub fn length(&self) -> Scalar
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>
sourcepub fn sample_first_derivative(&self, factor: Scalar) -> T
pub fn sample_first_derivative(&self, factor: Scalar) -> T
Velocity of change along the curve.
sourcepub fn sample_first_derivative_along_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<T>
pub fn sample_first_derivative_along_axis( &self, axis_value: Scalar, axis_index: usize ) -> Option<T>
Velocity of change along the curve axis.
sourcepub fn sample_second_derivative(&self, factor: Scalar) -> T
pub fn sample_second_derivative(&self, factor: Scalar) -> T
Acceleration of change along the curve.
sourcepub fn sample_second_derivative_along_axis(
&self,
axis_value: Scalar,
axis_index: usize
) -> Option<T>
pub fn sample_second_derivative_along_axis( &self, axis_value: Scalar, axis_index: usize ) -> Option<T>
Acceleration of change along the curve axis.
pub fn sample_k(&self, factor: Scalar) -> Scalar
pub fn sample_curvature_radius(&self, factor: Scalar) -> Scalar
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 split(&self, factor: Scalar) -> Result<(Self, Self), CurveError>
pub fn find_time_for_axis( &self, axis_value: Scalar, axis_index: usize ) -> Option<Scalar>
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Curve<T>where
T: Clone + Curved + CurvedChange + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Curve<T>where T: Clone + Curved + CurvedChange + Deserialize<'de>,
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<T> RefUnwindSafe for Curve<T>where T: RefUnwindSafe,
impl<T> Send for Curve<T>where T: Send,
impl<T> Sync for Curve<T>where T: Sync,
impl<T> Unpin for Curve<T>where T: Unpin,
impl<T> UnwindSafe for Curve<T>where T: UnwindSafe,
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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more