Struct rerun::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>) -> ViewCoordinates
pub fn new(xyz: impl Into<ViewCoordinates>) -> ViewCoordinates
Create a new ViewCoordinates
.
source§impl ViewCoordinates
impl ViewCoordinates
sourcepub const ULF: ViewCoordinates = _
pub const ULF: ViewCoordinates = _
X=Up, Y=Left, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const UFL: ViewCoordinates = _
pub const UFL: ViewCoordinates = _
X=Up, Y=Forward, Z=Left
sourcepub const LUF: ViewCoordinates = _
pub const LUF: ViewCoordinates = _
X=Left, Y=Up, Z=Forward
sourcepub const LFU: ViewCoordinates = _
pub const LFU: ViewCoordinates = _
X=Left, Y=Forward, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FUL: ViewCoordinates = _
pub const FUL: ViewCoordinates = _
X=Forward, Y=Up, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FLU: ViewCoordinates = _
pub const FLU: ViewCoordinates = _
X=Forward, Y=Left, Z=Up
sourcepub const ULB: ViewCoordinates = _
pub const ULB: ViewCoordinates = _
X=Up, Y=Left, Z=Back
sourcepub const UBL: ViewCoordinates = _
pub const UBL: ViewCoordinates = _
X=Up, Y=Back, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LUB: ViewCoordinates = _
pub const LUB: ViewCoordinates = _
X=Left, Y=Up, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LBU: ViewCoordinates = _
pub const LBU: ViewCoordinates = _
X=Left, Y=Back, Z=Up
sourcepub const BUL: ViewCoordinates = _
pub const BUL: ViewCoordinates = _
X=Back, Y=Up, Z=Left
sourcepub const BLU: ViewCoordinates = _
pub const BLU: ViewCoordinates = _
X=Back, Y=Left, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const URF: ViewCoordinates = _
pub const URF: ViewCoordinates = _
X=Up, Y=Right, Z=Forward
sourcepub const UFR: ViewCoordinates = _
pub const UFR: ViewCoordinates = _
X=Up, Y=Forward, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RUF: ViewCoordinates = _
pub const RUF: ViewCoordinates = _
X=Right, Y=Up, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RFU: ViewCoordinates = _
pub const RFU: ViewCoordinates = _
X=Right, Y=Forward, Z=Up
sourcepub const FUR: ViewCoordinates = _
pub const FUR: ViewCoordinates = _
X=Forward, Y=Up, Z=Right
sourcepub const FRU: ViewCoordinates = _
pub const FRU: ViewCoordinates = _
X=Forward, Y=Right, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const URB: ViewCoordinates = _
pub const URB: ViewCoordinates = _
X=Up, Y=Right, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const UBR: ViewCoordinates = _
pub const UBR: ViewCoordinates = _
X=Up, Y=Back, Z=Right
sourcepub const RUB: ViewCoordinates = _
pub const RUB: ViewCoordinates = _
X=Right, Y=Up, Z=Back
sourcepub const RBU: ViewCoordinates = _
pub const RBU: ViewCoordinates = _
X=Right, Y=Back, Z=Up
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BUR: ViewCoordinates = _
pub const BUR: ViewCoordinates = _
X=Back, Y=Up, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BRU: ViewCoordinates = _
pub const BRU: ViewCoordinates = _
X=Back, Y=Right, Z=Up
sourcepub const DLF: ViewCoordinates = _
pub const DLF: ViewCoordinates = _
X=Down, Y=Left, Z=Forward
sourcepub const DFL: ViewCoordinates = _
pub const DFL: ViewCoordinates = _
X=Down, Y=Forward, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LDF: ViewCoordinates = _
pub const LDF: ViewCoordinates = _
X=Left, Y=Down, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const LFD: ViewCoordinates = _
pub const LFD: ViewCoordinates = _
X=Left, Y=Forward, Z=Down
sourcepub const FDL: ViewCoordinates = _
pub const FDL: ViewCoordinates = _
X=Forward, Y=Down, Z=Left
sourcepub const FLD: ViewCoordinates = _
pub const FLD: ViewCoordinates = _
X=Forward, Y=Left, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DLB: ViewCoordinates = _
pub const DLB: ViewCoordinates = _
X=Down, Y=Left, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DBL: ViewCoordinates = _
pub const DBL: ViewCoordinates = _
X=Down, Y=Back, Z=Left
sourcepub const LDB: ViewCoordinates = _
pub const LDB: ViewCoordinates = _
X=Left, Y=Down, Z=Back
sourcepub const LBD: ViewCoordinates = _
pub const LBD: ViewCoordinates = _
X=Left, Y=Back, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BDL: ViewCoordinates = _
pub const BDL: ViewCoordinates = _
X=Back, Y=Down, Z=Left
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const BLD: ViewCoordinates = _
pub const BLD: ViewCoordinates = _
X=Back, Y=Left, Z=Down
sourcepub const DRF: ViewCoordinates = _
pub const DRF: ViewCoordinates = _
X=Down, Y=Right, Z=Forward
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const DFR: ViewCoordinates = _
pub const DFR: ViewCoordinates = _
X=Down, Y=Forward, Z=Right
sourcepub const RDF: ViewCoordinates = _
pub const RDF: ViewCoordinates = _
X=Right, Y=Down, Z=Forward
sourcepub const RFD: ViewCoordinates = _
pub const RFD: ViewCoordinates = _
X=Right, Y=Forward, Z=Down
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FDR: ViewCoordinates = _
pub const FDR: ViewCoordinates = _
X=Forward, Y=Down, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const FRD: ViewCoordinates = _
pub const FRD: ViewCoordinates = _
X=Forward, Y=Right, Z=Down
sourcepub const DRB: ViewCoordinates = _
pub const DRB: ViewCoordinates = _
X=Down, Y=Right, Z=Back
sourcepub const DBR: ViewCoordinates = _
pub const DBR: ViewCoordinates = _
X=Down, Y=Back, Z=Right
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RDB: ViewCoordinates = _
pub const RDB: ViewCoordinates = _
X=Right, Y=Down, Z=Back
⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.
sourcepub const RBD: ViewCoordinates = _
pub const RBD: ViewCoordinates = _
X=Right, Y=Back, Z=Down
sourcepub const BDR: ViewCoordinates = _
pub const BDR: ViewCoordinates = _
X=Back, Y=Down, Z=Right
sourcepub const BRD: ViewCoordinates = _
pub const BRD: ViewCoordinates = _
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: ViewCoordinates = _
pub const RIGHT_HAND_X_UP: ViewCoordinates = _
X=Up, Y=Right, Z=Forward
sourcepub const RIGHT_HAND_X_DOWN: ViewCoordinates = _
pub const RIGHT_HAND_X_DOWN: ViewCoordinates = _
X=Down, Y=Right, Z=Back
sourcepub const RIGHT_HAND_Y_UP: ViewCoordinates = _
pub const RIGHT_HAND_Y_UP: ViewCoordinates = _
X=Right, Y=Up, Z=Back
sourcepub const RIGHT_HAND_Y_DOWN: ViewCoordinates = _
pub const RIGHT_HAND_Y_DOWN: ViewCoordinates = _
X=Right, Y=Down, Z=Forward
sourcepub const RIGHT_HAND_Z_UP: ViewCoordinates = _
pub const RIGHT_HAND_Z_UP: ViewCoordinates = _
X=Right, Y=Forward, Z=Up
sourcepub const RIGHT_HAND_Z_DOWN: ViewCoordinates = _
pub const RIGHT_HAND_Z_DOWN: ViewCoordinates = _
X=Right, Y=Back, Z=Down
sourcepub const LEFT_HAND_X_UP: ViewCoordinates = _
pub const LEFT_HAND_X_UP: ViewCoordinates = _
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: ViewCoordinates = _
pub const LEFT_HAND_X_DOWN: ViewCoordinates = _
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: ViewCoordinates = _
pub const LEFT_HAND_Y_UP: ViewCoordinates = _
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: ViewCoordinates = _
pub const LEFT_HAND_Y_DOWN: ViewCoordinates = _
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: ViewCoordinates = _
pub const LEFT_HAND_Z_UP: ViewCoordinates = _
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: ViewCoordinates = _
pub const LEFT_HAND_Z_DOWN: ViewCoordinates = _
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>)>
) -> Result<ViewCoordinates, DeserializationError>
fn from_arrow_components( arrow_data: impl IntoIterator<Item = (ComponentName, Box<dyn Array>)> ) -> Result<ViewCoordinates, DeserializationError>
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.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request