pub struct PoseGraph { /* private fields */ }Expand description
Pose graph state machine
Implementations§
Source§impl PoseGraph
impl PoseGraph
pub fn new(initial_state: &str, initial_params: PoseParams) -> Self
pub fn add_node(&mut self, node: PoseNode)
pub fn add_transition(&mut self, transition: PoseTransition)
pub fn node_count(&self) -> usize
pub fn transition_count(&self) -> usize
pub fn current_state(&self) -> &str
pub fn is_transitioning(&self) -> bool
pub fn transition_progress(&self) -> f32
Sourcepub fn go_to(&mut self, state: &str) -> bool
pub fn go_to(&mut self, state: &str) -> bool
Trigger a transition to the named state. Returns false if no transition is defined or already in that state.
Sourcepub fn check_triggers(&mut self, params: &PoseParams)
pub fn check_triggers(&mut self, params: &PoseParams)
Check and auto-trigger transitions based on param values
Sourcepub fn evaluate(&self) -> PoseParams
pub fn evaluate(&self) -> PoseParams
Get current interpolated parameter values
Sourcepub fn reachable_states(&self) -> Vec<&str>
pub fn reachable_states(&self) -> Vec<&str>
Get all reachable states from current via BFS
Auto Trait Implementations§
impl Freeze for PoseGraph
impl RefUnwindSafe for PoseGraph
impl Send for PoseGraph
impl Sync for PoseGraph
impl Unpin for PoseGraph
impl UnsafeUnpin for PoseGraph
impl UnwindSafe for PoseGraph
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
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>
Converts
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>
Converts
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