pub struct TrackingDataElement {
pub name: String,
pub instrument_type: TrackingInstrumentType,
pub matrix: [[f32; 4]; 3],
}
Expand description
Tracking data element with name, type, and transformation matrix
Fields§
§name: String
Name/ID of the instrument/tracker (max 20 chars)
instrument_type: TrackingInstrumentType
Type of instrument
matrix: [[f32; 4]; 3]
Upper 3x4 portion of 4x4 transformation matrix (row-major) Last row [0, 0, 0, 1] is implicit
Implementations§
Source§impl TrackingDataElement
impl TrackingDataElement
Sourcepub fn new(
name: impl Into<String>,
instrument_type: TrackingInstrumentType,
matrix: [[f32; 4]; 3],
) -> Self
pub fn new( name: impl Into<String>, instrument_type: TrackingInstrumentType, matrix: [[f32; 4]; 3], ) -> Self
Create a new tracking data element
Sourcepub fn identity(
name: impl Into<String>,
instrument_type: TrackingInstrumentType,
) -> Self
pub fn identity( name: impl Into<String>, instrument_type: TrackingInstrumentType, ) -> Self
Create an identity transformation
Sourcepub fn with_translation(
name: impl Into<String>,
instrument_type: TrackingInstrumentType,
x: f32,
y: f32,
z: f32,
) -> Self
pub fn with_translation( name: impl Into<String>, instrument_type: TrackingInstrumentType, x: f32, y: f32, z: f32, ) -> Self
Create with translation only
Trait Implementations§
Source§impl Clone for TrackingDataElement
impl Clone for TrackingDataElement
Source§fn clone(&self) -> TrackingDataElement
fn clone(&self) -> TrackingDataElement
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 TrackingDataElement
impl Debug for TrackingDataElement
Source§impl PartialEq for TrackingDataElement
impl PartialEq for TrackingDataElement
impl StructuralPartialEq for TrackingDataElement
Auto Trait Implementations§
impl Freeze for TrackingDataElement
impl RefUnwindSafe for TrackingDataElement
impl Send for TrackingDataElement
impl Sync for TrackingDataElement
impl Unpin for TrackingDataElement
impl UnwindSafe for TrackingDataElement
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