re_types/components/
rotation_axis_angle.rs

1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs
2// Based on "crates/store/re_types/definitions/rerun/components/rotation_axis_angle.fbs".
3
4#![allow(unused_braces)]
5#![allow(unused_imports)]
6#![allow(unused_parens)]
7#![allow(clippy::allow_attributes)]
8#![allow(clippy::clone_on_copy)]
9#![allow(clippy::cloned_instead_of_copied)]
10#![allow(clippy::map_flatten)]
11#![allow(clippy::needless_question_mark)]
12#![allow(clippy::new_without_default)]
13#![allow(clippy::redundant_closure)]
14#![allow(clippy::too_many_arguments)]
15#![allow(clippy::too_many_lines)]
16#![allow(clippy::wildcard_imports)]
17
18use ::re_types_core::SerializationResult;
19use ::re_types_core::try_serialize_field;
20use ::re_types_core::{ComponentBatch as _, SerializedComponentBatch};
21use ::re_types_core::{ComponentDescriptor, ComponentType};
22use ::re_types_core::{DeserializationError, DeserializationResult};
23
24/// **Component**: 3D rotation represented by a rotation around a given axis.
25///
26/// If normalization of the rotation axis fails the rotation is treated as an invalid transform, unless the
27/// angle is zero in which case it is treated as an identity.
28#[derive(Clone, Debug, Default, Copy, PartialEq)]
29#[repr(transparent)]
30pub struct RotationAxisAngle(pub crate::datatypes::RotationAxisAngle);
31
32impl ::re_types_core::WrapperComponent for RotationAxisAngle {
33    type Datatype = crate::datatypes::RotationAxisAngle;
34
35    #[inline]
36    fn name() -> ComponentType {
37        "rerun.components.RotationAxisAngle".into()
38    }
39
40    #[inline]
41    fn into_inner(self) -> Self::Datatype {
42        self.0
43    }
44}
45
46::re_types_core::macros::impl_into_cow!(RotationAxisAngle);
47
48impl<T: Into<crate::datatypes::RotationAxisAngle>> From<T> for RotationAxisAngle {
49    fn from(v: T) -> Self {
50        Self(v.into())
51    }
52}
53
54impl std::borrow::Borrow<crate::datatypes::RotationAxisAngle> for RotationAxisAngle {
55    #[inline]
56    fn borrow(&self) -> &crate::datatypes::RotationAxisAngle {
57        &self.0
58    }
59}
60
61impl std::ops::Deref for RotationAxisAngle {
62    type Target = crate::datatypes::RotationAxisAngle;
63
64    #[inline]
65    fn deref(&self) -> &crate::datatypes::RotationAxisAngle {
66        &self.0
67    }
68}
69
70impl std::ops::DerefMut for RotationAxisAngle {
71    #[inline]
72    fn deref_mut(&mut self) -> &mut crate::datatypes::RotationAxisAngle {
73        &mut self.0
74    }
75}
76
77impl ::re_byte_size::SizeBytes for RotationAxisAngle {
78    #[inline]
79    fn heap_size_bytes(&self) -> u64 {
80        self.0.heap_size_bytes()
81    }
82
83    #[inline]
84    fn is_pod() -> bool {
85        <crate::datatypes::RotationAxisAngle>::is_pod()
86    }
87}