Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jul 17, 2023
1 parent deb7edf commit 17dd67d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script.
# It can be safely removed at anytime to force the build script to run again.
# Check out build.rs to see how it's computed.
ed23454dff7eea3feaa346c3ef79728865d0a10f6944204cd466ddc64d8d38b1
f5a7c9bfc1721e8c82a11887fcc912fd31fe33e7a90f86827c4ea12d030fd098
2 changes: 1 addition & 1 deletion crates/re_types/src/archetypes/transform3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#![allow(clippy::unnecessary_cast)]

/// A 3D transform
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub struct Transform3D {
/// The transform
pub transform: crate::components::Transform3D,
Expand Down
1 change: 1 addition & 0 deletions crates/re_types/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mod point2d_ext;
mod radius;
mod radius_ext;
mod transform3d;
mod transform3d_ext;

pub use self::class_id::ClassId;
pub use self::color::Color;
Expand Down
22 changes: 11 additions & 11 deletions crates/re_types/src/components/transform3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#![allow(clippy::unnecessary_cast)]

/// An affine transform between two 3D spaces, represented in a given direction.
#[derive(Clone, Debug)]
pub struct Transform3D {
#[derive(Clone, Debug, PartialEq)]
pub struct Transform3D(
/// Representation of the transform.
pub repr: crate::datatypes::Transform3D,
}
pub crate::datatypes::Transform3D,
);

impl<'a> From<Transform3D> for ::std::borrow::Cow<'a, Transform3D> {
#[inline]
Expand Down Expand Up @@ -255,26 +255,26 @@ impl crate::Loggable for Transform3D {
use crate::Loggable as _;
use ::arrow2::{array::*, datatypes::*};
Ok({
let (somes, repr): (Vec<_>, Vec<_>) = data
let (somes, data0): (Vec<_>, Vec<_>) = data
.into_iter()
.map(|datum| {
let datum: Option<::std::borrow::Cow<'a, Self>> = datum.map(Into::into);
let datum = datum.map(|datum| {
let Self { repr } = datum.into_owned();
repr
let Self(data0) = datum.into_owned();
data0
});
(datum.is_some(), datum)
})
.unzip();
let repr_bitmap: Option<::arrow2::bitmap::Bitmap> = {
let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = {
let any_nones = somes.iter().any(|some| !*some);
any_nones.then(|| somes.into())
};
{
_ = repr_bitmap;
_ = data0_bitmap;
_ = extension_wrapper;
crate::datatypes::Transform3D::try_to_arrow_opt(
repr,
data0,
Some("rerun.components.Transform3D"),
)?
}
Expand All @@ -301,7 +301,7 @@ impl crate::Loggable for Transform3D {
backtrace: ::backtrace::Backtrace::new_unresolved(),
})
})
.map(|res| res.map(|repr| Some(Self { repr })))
.map(|res| res.map(|v| Some(Self(v))))
.collect::<crate::DeserializationResult<Vec<Option<_>>>>()
.map_err(|err| crate::DeserializationError::Context {
location: "rerun.components.Transform3D#repr".into(),
Expand Down
9 changes: 9 additions & 0 deletions crates/re_types/src/datatypes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

mod angle;
mod angle_ext;
mod fuzzy;
mod mat3x3;
mod mat3x3_ext;
mod mat4x4;
mod point2d;
mod point2d_ext;
mod quaternion;
mod quaternion_ext;
mod rotation3d;
mod rotation3d_ext;
mod rotation_axis_angle;
mod rotation_axis_angle_ext;
mod scale3d;
mod scale3d_ext;
mod transform3d;
mod transform3d_ext;
mod translation_and_mat3x3;
mod translation_and_mat3x3_ext;
mod translation_rotation_scale3d;
mod translation_rotation_scale3d_ext;
mod vec2d;
mod vec2d_ext;
mod vec3d;
mod vec3d_ext;
mod vec4d;

pub use self::angle::Angle;
Expand Down

0 comments on commit 17dd67d

Please sign in to comment.