Struct ecoord_core::reference_frames::ReferenceFrames
source · pub struct ReferenceFrames { /* private fields */ }
Expand description
Represents a list of transforms for representing different coordinate frames.
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 frame_info(&self) -> &HashMap<FrameId, FrameInfo>
pub fn channel_info(&self) -> &HashMap<ChannelId, ChannelInfo>
pub fn transform_info(&self) -> &HashMap<TransformId, TransformInfo>
sourcepub fn get_subset(
&self,
selected_channel_ids: &[ChannelId],
) -> Result<ReferenceFrames, Error>
pub fn get_subset( &self, selected_channel_ids: &[ChannelId], ) -> Result<ReferenceFrames, Error>
Creates a subset of.
pub fn get_timed_subset( &self, timestamp: &DateTime<Utc>, ) -> Result<ReferenceFrames, Error>
pub fn set_interpolation_method( &mut self, transform_id: TransformId, method: Option<InterpolationMethod>, )
pub fn transforms(&self) -> &HashMap<(ChannelId, TransformId), Vec<Transform>>
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.
pub fn get_channel_ids(&self) -> HashSet<ChannelId>
pub fn get_frame_ids(&self) -> HashSet<FrameId>
pub fn get_channel_priority(&self, channel_id: &ChannelId) -> i32
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
pub fn add_transform( &mut self, channel_id: ChannelId, transform_id: TransformId, transforms: Vec<Transform>, channel_info: Option<ChannelInfo>, transform_info: Option<TransformInfo>, ) -> Result<(), Error>
pub fn get_interpolation_method( &self, transform_id: &TransformId, ) -> Option<InterpolationMethod>
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 copy 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
source§fn eq(&self, other: &ReferenceFrames) -> bool
fn eq(&self, other: &ReferenceFrames) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<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.