Struct re_sdk::components::ViewCoordinates
source · pub struct ViewCoordinates(pub [ViewDir; 3]);Expand description
How we interpret the coordinate system of an entity/space.
For instance: What is “up”? What does the Z axis mean? Is this right-handed or left-handed?
For 3D view-space and image-space.
use re_log_types::component_types::ViewCoordinates;
use arrow2_convert::field::ArrowField;
use arrow2::datatypes::{DataType, Field};
assert_eq!(
ViewCoordinates::data_type(),
DataType::FixedSizeBinary(3)
);Tuple Fields§
§0: [ViewDir; 3]Implementations§
source§impl ViewCoordinates
impl ViewCoordinates
sourcepub fn from_up_and_handedness(
up: SignedAxis3,
handedness: Handedness
) -> ViewCoordinates
pub fn from_up_and_handedness( up: SignedAxis3, handedness: Handedness ) -> ViewCoordinates
Choses a coordinate system based on just an up-axis.
sourcepub fn sanity_check(&self) -> Result<(), String>
pub fn sanity_check(&self) -> Result<(), String>
Returns an error if this does not span all three dimensions.
pub fn up(&self) -> Option<SignedAxis3>
pub fn right(&self) -> Option<SignedAxis3>
pub fn forward(&self) -> Option<SignedAxis3>
pub fn describe_short(&self) -> String
pub fn describe(&self) -> String
sourcepub fn from_rub(&self) -> Mat3
pub fn from_rub(&self) -> Mat3
Returns a matrix that translates RUB to this coordinate system.
(RUB: X=Right, Y=Up, B=Back)
sourcepub fn to_rub(&self) -> Mat3
pub fn to_rub(&self) -> Mat3
Returns a matrix that translates this coordinate system to RUB.
(RUB: X=Right, Y=Up, B=Back)
pub fn handedness(&self) -> Option<Handedness>
Trait Implementations§
source§impl ArrowDeserialize for ViewCoordinates
impl ArrowDeserialize for ViewCoordinates
§type ArrayType = <FixedSizeBinary<3> as ArrowDeserialize>::ArrayType
type ArrayType = <FixedSizeBinary<3> as ArrowDeserialize>::ArrayType
The
arrow2::Array type corresponding to this fieldsource§fn arrow_deserialize(
bytes: <&<ViewCoordinates as ArrowDeserialize>::ArrayType as IntoIterator>::Item
) -> Option<<ViewCoordinates as ArrowField>::Type>
fn arrow_deserialize( bytes: <&<ViewCoordinates as ArrowDeserialize>::ArrayType as IntoIterator>::Item ) -> Option<<ViewCoordinates as ArrowField>::Type>
Deserialize this field from arrow
source§impl ArrowField for ViewCoordinates
impl ArrowField for ViewCoordinates
source§impl ArrowSerialize for ViewCoordinates
impl ArrowSerialize for ViewCoordinates
§type MutableArrayType = <FixedSizeBinary<3> as ArrowSerialize>::MutableArrayType
type MutableArrayType = <FixedSizeBinary<3> as ArrowSerialize>::MutableArrayType
The
arrow2::array::MutableArray that holds this valuesource§fn new_array() -> <ViewCoordinates as ArrowSerialize>::MutableArrayType
fn new_array() -> <ViewCoordinates as ArrowSerialize>::MutableArrayType
Create a new mutable array
source§fn arrow_serialize(
v: &ViewCoordinates,
array: &mut <ViewCoordinates as ArrowSerialize>::MutableArrayType
) -> Result<(), Error>
fn arrow_serialize( v: &ViewCoordinates, array: &mut <ViewCoordinates as ArrowSerialize>::MutableArrayType ) -> Result<(), Error>
Serialize this field to arrow
source§impl Clone for ViewCoordinates
impl Clone for ViewCoordinates
source§fn clone(&self) -> ViewCoordinates
fn clone(&self) -> ViewCoordinates
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 Component for ViewCoordinates
impl Component for ViewCoordinates
source§impl Debug for ViewCoordinates
impl Debug for ViewCoordinates
source§impl<'de> Deserialize<'de> for ViewCoordinates
impl<'de> Deserialize<'de> for ViewCoordinates
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ViewCoordinates, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ViewCoordinates, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromStr for ViewCoordinates
impl FromStr for ViewCoordinates
source§impl PartialEq<ViewCoordinates> for ViewCoordinates
impl PartialEq<ViewCoordinates> for ViewCoordinates
source§fn eq(&self, other: &ViewCoordinates) -> bool
fn eq(&self, other: &ViewCoordinates) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ViewCoordinates
impl Serialize for ViewCoordinates
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ViewCoordinates
impl Eq for ViewCoordinates
impl StructuralEq for ViewCoordinates
impl StructuralPartialEq for ViewCoordinates
Auto Trait Implementations§
impl RefUnwindSafe for ViewCoordinates
impl Send for ViewCoordinates
impl Sync for ViewCoordinates
impl Unpin for ViewCoordinates
impl UnwindSafe for ViewCoordinates
Blanket Implementations§
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.