pub struct ReferenceFrames {
pub transforms: HashMap<(ChannelId, TransformId), Vec<Transform>>,
pub frame_info: HashMap<FrameId, FrameInfo>,
pub channel_info: HashMap<ChannelId, ChannelInfo>,
pub transform_info: HashMap<TransformId, TransformInfo>,
}
Expand description
Represents a list of transforms for representing different coordinate frames.
Fields§
§transforms: HashMap<(ChannelId, TransformId), Vec<Transform>>
§frame_info: HashMap<FrameId, FrameInfo>
§channel_info: HashMap<ChannelId, ChannelInfo>
§transform_info: HashMap<TransformId, TransformInfo>
Implementations§
Source§impl ReferenceFrames
impl ReferenceFrames
pub fn new( transforms: HashMap<(ChannelId, TransformId), Vec<Transform>>, frame_info: HashMap<FrameId, FrameInfo>, channel_info: HashMap<ChannelId, ChannelInfo>, transform_info: HashMap<TransformId, TransformInfo>, ) -> Result<Self, Error>
pub fn is_empty(&self) -> bool
pub fn transforms(&self) -> &HashMap<(ChannelId, TransformId), Vec<Transform>>
pub fn frame_info(&self) -> &HashMap<FrameId, FrameInfo>
pub fn channel_info(&self) -> &HashMap<ChannelId, ChannelInfo>
pub fn transform_info(&self) -> &HashMap<TransformId, TransformInfo>
Source§impl ReferenceFrames
impl ReferenceFrames
pub fn get_channel_ids(&self) -> HashSet<ChannelId>
pub fn get_frame_ids(&self) -> HashSet<FrameId>
pub fn get_transforms_of_channel( &self, channel_id: &ChannelId, transform_id: &TransformId, ) -> Result<&Vec<Transform>, Error>
pub fn get_channel_priority(&self, channel_id: &ChannelId) -> Result<i32, Error>
pub fn get_interpolation_method( &self, transform_id: &TransformId, ) -> InterpolationMethod
pub fn get_extrapolation_method( &self, transform_id: &TransformId, ) -> ExtrapolationMethod
pub fn contains_channel(&self, channel_id: &ChannelId) -> bool
pub fn contains_frame(&self, frame_id: &FrameId) -> bool
pub fn contains_transform( &self, channel_id: &ChannelId, transform_id: &TransformId, ) -> bool
Source§impl ReferenceFrames
impl ReferenceFrames
pub fn set_interpolation_method( &mut self, transform_id: TransformId, method: InterpolationMethod, )
pub fn set_extrapolation_method( &mut self, transform_id: TransformId, method: ExtrapolationMethod, )
pub fn add_transforms( &mut self, channel_id: ChannelId, transform_id: TransformId, transforms: Vec<Transform>, channel_info: Option<ChannelInfo>, transform_info: Option<TransformInfo>, ) -> Result<(), Error>
pub fn extend_transforms( &mut self, channel_id: ChannelId, transform_id: TransformId, transforms: Vec<Transform>, ) -> Result<(), Error>
Source§impl ReferenceFrames
impl ReferenceFrames
Sourcepub fn filter_by_channel_ids(
&self,
channel_ids: &[ChannelId],
) -> Result<ReferenceFrames, Error>
pub fn filter_by_channel_ids( &self, channel_ids: &[ChannelId], ) -> Result<ReferenceFrames, Error>
Filter by channel ids
pub fn filter_by_transform_ids( &self, transform_ids: &[TransformId], ) -> Result<ReferenceFrames, Error>
pub fn filter_by_time_interval( &self, start_time: &Option<DateTime<Utc>>, stop_time: &Option<DateTime<Utc>>, ) -> Result<ReferenceFrames, Error>
Source§impl ReferenceFrames
impl ReferenceFrames
pub fn get_timed_subset( &self, timestamp: &DateTime<Utc>, ) -> Result<ReferenceFrames, Error>
Sourcepub fn get_valid_transform(
&self,
channel_id: &ChannelId,
transform_id: &TransformId,
timestamp: &Option<DateTime<Utc>>,
) -> Result<Vec<&Transform>, Error>
pub fn get_valid_transform( &self, channel_id: &ChannelId, transform_id: &TransformId, timestamp: &Option<DateTime<Utc>>, ) -> Result<Vec<&Transform>, Error>
Returns the transforms valid at a specific timestamp.
Sourcepub fn derive_transform_graph(
&self,
selected_channel_ids: &Option<HashSet<ChannelId>>,
selected_timestamp: &Option<DateTime<Utc>>,
) -> Result<IsometryGraph, Error>
pub fn derive_transform_graph( &self, selected_channel_ids: &Option<HashSet<ChannelId>>, selected_timestamp: &Option<DateTime<Utc>>, ) -> Result<IsometryGraph, Error>
Derive a concrete transform graph for a specific timestamp and selected channels.
selected_channel_ids
- Selected channels for building the transform graph.selected_timestamp
- Timestamp to choose for interpolating time-dependent transforms.
Trait Implementations§
Source§impl Clone for ReferenceFrames
impl Clone for ReferenceFrames
Source§fn clone(&self) -> ReferenceFrames
fn clone(&self) -> ReferenceFrames
Returns a duplicate of the value. Read more
1.0.0 · 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 ReferenceFrames
impl Debug for ReferenceFrames
Source§impl Default for ReferenceFrames
impl Default for ReferenceFrames
Source§fn default() -> ReferenceFrames
fn default() -> ReferenceFrames
Returns the “default value” for a type. Read more
Source§impl PartialEq for ReferenceFrames
impl PartialEq for ReferenceFrames
impl StructuralPartialEq for ReferenceFrames
Auto Trait Implementations§
impl Freeze for ReferenceFrames
impl RefUnwindSafe for ReferenceFrames
impl Send for ReferenceFrames
impl Sync for ReferenceFrames
impl Unpin for ReferenceFrames
impl UnwindSafe for ReferenceFrames
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.