Struct cartesian_trajectories::PositionGenerator [−][src]
pub struct PositionGenerator(_);
Struct that wraps a function that generates a position
Implementations
impl PositionGenerator
[src]
impl PositionGenerator
[src]pub fn new(
position_generator_function: Box<dyn FnMut(&Vector3<f64>, f64) -> Vector3<f64>>
) -> Self
[src]
pub fn new(
position_generator_function: Box<dyn FnMut(&Vector3<f64>, f64) -> Vector3<f64>>
) -> Self
[src]generates a new PositionGenerator by defining a function that takes an initial position and a progress between 0 and 1 and returns a position.
pub fn get_position(
&mut self,
start_position: &Vector3<f64>,
progress: f64
) -> Vector3<f64>
[src]
pub fn get_position(
&mut self,
start_position: &Vector3<f64>,
progress: f64
) -> Vector3<f64>
[src]Evaluates the function of the PositionGenerator
Arguments
start_position
- the position at the start time of the PositionGeneratorprogress
- a progress from 0, indicating the start, and 1 , indicating the end of the trajectory.
pub fn constant_position_generator() -> Self
[src]
pub fn constant_position_generator() -> Self
[src]creates a position generator that does not move and therefore always returns the start position.
Auto Trait Implementations
impl !RefUnwindSafe for PositionGenerator
impl !Send for PositionGenerator
impl !Sync for PositionGenerator
impl Unpin for PositionGenerator
impl !UnwindSafe for PositionGenerator
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,