Struct re_types::archetypes::ViewCoordinates
source · #[repr(transparent)]pub struct ViewCoordinates {
pub xyz: ViewCoordinates,
}
Expand description
Archetype: How we interpret the coordinate system of an entity/space.
For instance: What is “up”? What does the Z axis mean?
The three coordinates are always ordered as [x, y, z].
For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward.
Make sure that this archetype is logged at or above the origin entity path of your 3D views.
⚠ Rerun does not yet support left-handed coordinate systems.
§Example
§View coordinates for adjusting the eye camera
fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_view_coordinates").spawn()?;
rec.log_static("world", &rerun::ViewCoordinates::RIGHT_HAND_Z_UP)?; // Set an up-axis
rec.log(
"world/xyz",
&rerun::Arrows3D::from_vectors(
[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], //
)
.with_colors([[255, 0, 0], [0, 255, 0], [0, 0, 255]]),
)?;
Ok(())
}
Fields§
§xyz: ViewCoordinates
The directions of the [x, y, z] axes.
Implementations§
source§impl ViewCoordinates
impl ViewCoordinates
sourcepub const NUM_COMPONENTS: usize = 2usize
pub const NUM_COMPONENTS: usize = 2usize
The total number of components in the archetype: 1 required, 1 recommended, 0 optional
source§impl ViewCoordinates
impl ViewCoordinates
sourcepub fn new(xyz: impl Into<ViewCoordinates>) -> Self
pub fn new(xyz: impl Into<ViewCoordinates>) -> Self
Create a new ViewCoordinates
.
source§impl ViewCoordinates
impl ViewCoordinates
sourcepub const ULF: Self = _
pub const ULF: Self = _
X=Up, Y=Left, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LFU: Self = _
pub const LFU: Self = _
X=Left, Y=Forward, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FUL: Self = _
pub const FUL: Self = _
X=Forward, Y=Up, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const UBL: Self = _
pub const UBL: Self = _
X=Up, Y=Back, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LUB: Self = _
pub const LUB: Self = _
X=Left, Y=Up, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BLU: Self = _
pub const BLU: Self = _
X=Back, Y=Left, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const UFR: Self = _
pub const UFR: Self = _
X=Up, Y=Forward, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RUF: Self = _
pub const RUF: Self = _
X=Right, Y=Up, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FRU: Self = _
pub const FRU: Self = _
X=Forward, Y=Right, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const URB: Self = _
pub const URB: Self = _
X=Up, Y=Right, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RBU: Self = _
pub const RBU: Self = _
X=Right, Y=Back, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BUR: Self = _
pub const BUR: Self = _
X=Back, Y=Up, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DFL: Self = _
pub const DFL: Self = _
X=Down, Y=Forward, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LDF: Self = _
pub const LDF: Self = _
X=Left, Y=Down, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FLD: Self = _
pub const FLD: Self = _
X=Forward, Y=Left, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DLB: Self = _
pub const DLB: Self = _
X=Down, Y=Left, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LBD: Self = _
pub const LBD: Self = _
X=Left, Y=Back, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BDL: Self = _
pub const BDL: Self = _
X=Back, Y=Down, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DRF: Self = _
pub const DRF: Self = _
X=Down, Y=Right, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RFD: Self = _
pub const RFD: Self = _
X=Right, Y=Forward, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FDR: Self = _
pub const FDR: Self = _
X=Forward, Y=Down, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DBR: Self = _
pub const DBR: Self = _
X=Down, Y=Back, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RDB: Self = _
pub const RDB: Self = _
X=Right, Y=Down, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BRD: Self = _
pub const BRD: Self = _
X=Back, Y=Right, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RIGHT_HAND_X_UP: Self = _
pub const RIGHT_HAND_X_UP: Self = _
X=Up, Y=Right, Z=Forward
sourcepub const RIGHT_HAND_X_DOWN: Self = _
pub const RIGHT_HAND_X_DOWN: Self = _
X=Down, Y=Right, Z=Back
sourcepub const RIGHT_HAND_Y_UP: Self = _
pub const RIGHT_HAND_Y_UP: Self = _
X=Right, Y=Up, Z=Back
sourcepub const RIGHT_HAND_Y_DOWN: Self = _
pub const RIGHT_HAND_Y_DOWN: Self = _
X=Right, Y=Down, Z=Forward
sourcepub const RIGHT_HAND_Z_UP: Self = _
pub const RIGHT_HAND_Z_UP: Self = _
X=Right, Y=Forward, Z=Up
sourcepub const RIGHT_HAND_Z_DOWN: Self = _
pub const RIGHT_HAND_Z_DOWN: Self = _
X=Right, Y=Back, Z=Down
sourcepub const LEFT_HAND_X_UP: Self = _
pub const LEFT_HAND_X_UP: Self = _
X=Up, Y=Right, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LEFT_HAND_X_DOWN: Self = _
pub const LEFT_HAND_X_DOWN: Self = _
X=Down, Y=Right, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LEFT_HAND_Y_UP: Self = _
pub const LEFT_HAND_Y_UP: Self = _
X=Right, Y=Up, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LEFT_HAND_Y_DOWN: Self = _
pub const LEFT_HAND_Y_DOWN: Self = _
X=Right, Y=Down, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LEFT_HAND_Z_UP: Self = _
pub const LEFT_HAND_Z_UP: Self = _
X=Right, Y=Back, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LEFT_HAND_Z_DOWN: Self = _
pub const LEFT_HAND_Z_DOWN: Self = _
X=Right, Y=Forward, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
Trait Implementations§
source§impl Archetype for ViewCoordinates
impl Archetype for ViewCoordinates
§type Indicator = GenericIndicatorComponent<ViewCoordinates>
type Indicator = GenericIndicatorComponent<ViewCoordinates>
source§fn name() -> ArchetypeName
fn name() -> ArchetypeName
rerun.archetypes.Points2D
.source§fn display_name() -> &'static str
fn display_name() -> &'static str
source§fn indicator() -> MaybeOwnedComponentBatch<'static>
fn indicator() -> MaybeOwnedComponentBatch<'static>
source§fn required_components() -> Cow<'static, [ComponentName]>
fn required_components() -> Cow<'static, [ComponentName]>
source§fn recommended_components() -> Cow<'static, [ComponentName]>
fn recommended_components() -> Cow<'static, [ComponentName]>
source§fn optional_components() -> Cow<'static, [ComponentName]>
fn optional_components() -> Cow<'static, [ComponentName]>
source§fn all_components() -> Cow<'static, [ComponentName]>
fn all_components() -> Cow<'static, [ComponentName]>
source§fn from_arrow_components(
arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)>
) -> DeserializationResult<Self>
fn from_arrow_components( arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)> ) -> DeserializationResult<Self>
ComponentNames
, deserializes them
into this archetype. Read moresource§fn from_arrow(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>
) -> Result<Self, DeserializationError>where
Self: Sized,
fn from_arrow(
data: impl IntoIterator<Item = (Field, Box<dyn Array>)>
) -> Result<Self, DeserializationError>where
Self: Sized,
source§impl AsComponents for ViewCoordinates
impl AsComponents for ViewCoordinates
source§fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
ComponentBatch
s. Read moresource§impl Clone for ViewCoordinates
impl Clone for ViewCoordinates
source§fn clone(&self) -> ViewCoordinates
fn clone(&self) -> ViewCoordinates
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ViewCoordinates
impl Debug for ViewCoordinates
source§impl PartialEq for ViewCoordinates
impl PartialEq for ViewCoordinates
source§fn eq(&self, other: &ViewCoordinates) -> bool
fn eq(&self, other: &ViewCoordinates) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl SizeBytes for ViewCoordinates
impl SizeBytes for ViewCoordinates
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read moreimpl ArchetypeReflectionMarker for ViewCoordinates
impl Copy for ViewCoordinates
impl Eq for ViewCoordinates
impl Pod for ViewCoordinates
impl StructuralPartialEq for ViewCoordinates
Auto Trait Implementations§
impl Freeze for ViewCoordinates
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> 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
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>,
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.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>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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