Struct rerun::components::HalfSize3D
source · #[repr(transparent)]pub struct HalfSize3D(pub Vec3D);
Expand description
Component: Half-size (radius) of a 3D box.
Measured in its local coordinate system.
The box extends both in negative and positive direction along each axis. Negative sizes indicate that the box is flipped along the respective axis, but this has no effect on how it is displayed.
Tuple Fields§
§0: Vec3D
Implementations§
source§impl HalfSize3D
impl HalfSize3D
sourcepub const fn new(
half_width: f32,
half_height: f32,
half_depth: f32
) -> HalfSize3D
pub const fn new( half_width: f32, half_height: f32, half_depth: f32 ) -> HalfSize3D
Create a new half-extent from half-width, half-height, half-depth.
sourcepub const fn splat(half_size: f32) -> HalfSize3D
pub const fn splat(half_size: f32) -> HalfSize3D
Create a new half-extent with all the same sizes (a radius, perhaps).
sourcepub fn box_min(self, box_center: Position3D) -> Vec3
pub fn box_min(self, box_center: Position3D) -> Vec3
Returns the min position of a box with these half-extents and a given center.
In “image space axis semantics” (y-axis points down, x-axis points right), this is the top-left corner.
sourcepub fn box_max(self, box_center: Position3D) -> Vec3
pub fn box_max(self, box_center: Position3D) -> Vec3
Returns the maximum of a box with these half-extents and a given center.
In “image space axis semantics” (y-axis points down, x-axis points right), this is the bottom-right corner.
Methods from Deref<Target = Vec3D>§
Trait Implementations§
source§impl Borrow<Vec3D> for HalfSize3D
impl Borrow<Vec3D> for HalfSize3D
source§impl Clone for HalfSize3D
impl Clone for HalfSize3D
source§fn clone(&self) -> HalfSize3D
fn clone(&self) -> HalfSize3D
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HalfSize3D
impl Debug for HalfSize3D
source§impl Default for HalfSize3D
impl Default for HalfSize3D
source§fn default() -> HalfSize3D
fn default() -> HalfSize3D
source§impl Deref for HalfSize3D
impl Deref for HalfSize3D
source§impl DerefMut for HalfSize3D
impl DerefMut for HalfSize3D
source§impl From<HalfSize3D> for Vec3
impl From<HalfSize3D> for Vec3
source§fn from(extent: HalfSize3D) -> Vec3
fn from(extent: HalfSize3D) -> Vec3
source§impl<T> From<T> for HalfSize3D
impl<T> From<T> for HalfSize3D
source§fn from(v: T) -> HalfSize3D
fn from(v: T) -> HalfSize3D
source§impl Loggable for HalfSize3D
impl Loggable for HalfSize3D
type Name = ComponentName
source§fn name() -> <HalfSize3D as Loggable>::Name
fn name() -> <HalfSize3D as Loggable>::Name
rerun.datatypes.Vec2D
.source§fn arrow_datatype() -> DataType
fn arrow_datatype() -> DataType
arrow2::datatypes::DataType
, excluding datatype extensions.source§fn to_arrow_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, HalfSize3D>>>>
) -> Result<Box<dyn Array>, SerializationError>where
HalfSize3D: Clone + 'a,
fn to_arrow_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, HalfSize3D>>>>
) -> Result<Box<dyn Array>, SerializationError>where
HalfSize3D: Clone + 'a,
source§fn from_arrow_opt(
arrow_data: &(dyn Array + 'static)
) -> Result<Vec<Option<HalfSize3D>>, DeserializationError>where
HalfSize3D: Sized,
fn from_arrow_opt(
arrow_data: &(dyn Array + 'static)
) -> Result<Vec<Option<HalfSize3D>>, DeserializationError>where
HalfSize3D: Sized,
Loggable
s.source§fn from_arrow(
arrow_data: &(dyn Array + 'static)
) -> Result<Vec<HalfSize3D>, DeserializationError>where
HalfSize3D: Sized,
fn from_arrow(
arrow_data: &(dyn Array + 'static)
) -> Result<Vec<HalfSize3D>, DeserializationError>where
HalfSize3D: Sized,
Loggable
s.source§impl PartialEq for HalfSize3D
impl PartialEq for HalfSize3D
source§fn eq(&self, other: &HalfSize3D) -> bool
fn eq(&self, other: &HalfSize3D) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl SizeBytes for HalfSize3D
impl SizeBytes for HalfSize3D
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 Copy for HalfSize3D
impl Pod for HalfSize3D
impl StructuralPartialEq for HalfSize3D
Auto Trait Implementations§
impl Freeze for HalfSize3D
impl RefUnwindSafe for HalfSize3D
impl Send for HalfSize3D
impl Sync for HalfSize3D
impl Unpin for HalfSize3D
impl UnwindSafe for HalfSize3D
Blanket Implementations§
source§impl<C> AsComponents for Cwhere
C: Component,
impl<C> AsComponents for Cwhere
C: Component,
source§fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>
ComponentBatch
s. Read moresource§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>
source§impl<C> ComponentBatch for Cwhere
C: Component,
impl<C> ComponentBatch for Cwhere
C: Component,
source§fn to_arrow_list_array(&self) -> Result<ListArray<i32>, SerializationError>
fn to_arrow_list_array(&self) -> Result<ListArray<i32>, SerializationError>
§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<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