Skip to content

Commit

Permalink
rerun codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jun 26, 2023
1 parent 7790bf8 commit f70680d
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 54 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.
62b5ab97ac812d4b0b69814db05cda55e60ce9999dbb2416e8ca191bd8b0912d
b064d1e9d76b26cb03e6482a2e29f8c46c94df8c5d7dfce6522ca2a61da8807b
55 changes: 27 additions & 28 deletions crates/re_types/src/archetypes/points2d.rs
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A 2D point cloud with positions and optional colors, radii, labels, etc.
#[doc = "A 2D point cloud with positions and optional colors, radii, labels, etc."]
#[derive(Debug, Clone, PartialEq)]
pub struct Points2D {
/// All the actual 2D points that make up the point cloud.
#[doc = "All the actual 2D points that make up the point cloud."]
pub points: Vec<crate::components::Point2D>,

/// Optional radii for the points, effectively turning them into circles.
#[doc = "Optional radii for the points, effectively turning them into circles."]
pub radii: Option<Vec<crate::components::Radius>>,

/// Optional colors for the points.
#[doc = "Optional colors for the points."]
pub colors: Option<Vec<crate::components::Color>>,

/// Optional text labels for the points.
#[doc = "Optional text labels for the points."]
pub labels: Option<Vec<crate::components::Label>>,

/// An optional floating point value that specifies the 2D drawing order.
/// Objects with higher values are drawn on top of those with lower values.
///
/// The default for 2D points is 30.0.
#[doc = "An optional floating point value that specifies the 2D drawing order."]
#[doc = "Objects with higher values are drawn on top of those with lower values."]
#[doc = ""]
#[doc = "The default for 2D points is 30.0."]
pub draw_order: Option<crate::components::DrawOrder>,

/// Optional class Ids for the points.
///
/// The class ID provides colors and labels if not specified explicitly.
#[doc = "Optional class Ids for the points."]
#[doc = ""]
#[doc = "The class ID provides colors and labels if not specified explicitly."]
pub class_ids: Option<Vec<crate::components::ClassId>>,

/// Optional keypoint IDs for the points, identifying them within a class.
///
/// If keypoint IDs are passed in but no class IDs were specified, the class ID will
/// default to 0.
/// This is useful to identify points within a single classification (which is identified
/// with `class_id`).
/// E.g. the classification might be 'Person' and the keypoints refer to joints on a
/// detected skeleton.
#[doc = "Optional keypoint IDs for the points, identifying them within a class."]
#[doc = ""]
#[doc = "If keypoint IDs are passed in but no class IDs were specified, the class ID will"]
#[doc = "default to 0."]
#[doc = "This is useful to identify points within a single classification (which is identified"]
#[doc = "with `class_id`)."]
#[doc = "E.g. the classification might be 'Person' and the keypoints refer to joints on a"]
#[doc = "detected skeleton."]
pub keypoint_ids: Option<Vec<crate::components::KeypointId>>,

/// Unique identifiers for each individual point in the batch.
#[doc = "Unique identifiers for each individual point in the batch."]
pub instance_keys: Option<Vec<crate::components::InstanceKey>>,
}

impl Points2D {
pub const REQUIRED_COMPONENTS: [crate::ComponentName; 1] =
pub const REQUIRED_COMPONENTS: [crate::ComponentName; 1usize] =
[crate::ComponentName::Borrowed("rerun.components.Point2D")];

pub const RECOMMENDED_COMPONENTS: [crate::ComponentName; 2] = [
pub const RECOMMENDED_COMPONENTS: [crate::ComponentName; 2usize] = [
crate::ComponentName::Borrowed("rerun.components.Radius"),
crate::ComponentName::Borrowed("rerun.components.Color"),
];

pub const OPTIONAL_COMPONENTS: [crate::ComponentName; 5] = [
pub const OPTIONAL_COMPONENTS: [crate::ComponentName; 5usize] = [
crate::ComponentName::Borrowed("rerun.components.Label"),
crate::ComponentName::Borrowed("rerun.components.DrawOrder"),
crate::ComponentName::Borrowed("rerun.components.ClassId"),
crate::ComponentName::Borrowed("rerun.components.KeypointId"),
crate::ComponentName::Borrowed("rerun.components.InstanceKey"),
];

pub const ALL_COMPONENTS: [crate::ComponentName; 8] = [
pub const ALL_COMPONENTS: [crate::ComponentName; 8usize] = [
crate::ComponentName::Borrowed("rerun.components.Point2D"),
crate::ComponentName::Borrowed("rerun.components.Radius"),
crate::ComponentName::Borrowed("rerun.components.Color"),
Expand Down Expand Up @@ -86,10 +86,9 @@ impl crate::Archetype for Points2D {
Self::OPTIONAL_COMPONENTS.to_vec()
}

#[allow(clippy::unimplemented)]
#[allow(clippy::todo)]
fn to_arrow_datatypes() -> Vec<arrow2::datatypes::DataType> {
// TODO(#2368): dump the arrow registry into the generated code
unimplemented!("query the registry for all fqnames"); // NOLINT
todo!("query the registry for all fqnames");
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/re_types/src/components/class_id.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A 16-bit ID representing a type of semantic class.
///
/// Used to look up a `crate::components::ClassDescription` within the `crate::components::AnnotationContext`.
#[doc = "A 16-bit ID representing a type of semantic class."]
#[doc = ""]
#[doc = "Used to look up a `crate::components::ClassDescription` within the `crate::components::AnnotationContext`."]
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ClassId(pub u16);

Expand Down
13 changes: 11 additions & 2 deletions crates/re_types/src/components/color.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// An RGBA color tuple with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
#[doc = "An RGBA color tuple with unmultiplied/separate alpha, in sRGB gamma space with linear alpha."]
#[derive(
Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, bytemuck::Pod, bytemuck::Zeroable,
Debug,
Default,
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
bytemuck :: Pod,
bytemuck :: Zeroable,
)]
#[repr(transparent)]
pub struct Color(pub u32);
Expand Down
14 changes: 7 additions & 7 deletions crates/re_types/src/components/draw_order.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// Draw order used for the display order of 2D elements.
///
/// Higher values are drawn on top of lower values.
/// An entity can have only a single draw order component.
/// Within an entity draw order is governed by the order of the components.
///
/// Draw order for entities with the same draw order is generally undefined.
#[doc = "Draw order used for the display order of 2D elements."]
#[doc = ""]
#[doc = "Higher values are drawn on top of lower values."]
#[doc = "An entity can have only a single draw order component."]
#[doc = "Within an entity draw order is governed by the order of the components."]
#[doc = ""]
#[doc = "Draw order for entities with the same draw order is generally undefined."]
#[derive(Debug, Clone, Copy)]
#[repr(transparent)]
pub struct DrawOrder(pub f32);
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/src/components/instance_key.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A unique numeric identifier for each individual instance within a batch.
#[doc = "A unique numeric identifier for each individual instance within a batch."]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct InstanceKey(pub u64);

Expand Down
10 changes: 5 additions & 5 deletions crates/re_types/src/components/keypoint_id.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A 16-bit ID representing a type of semantic keypoint within a class.
///
/// `KeypointId`s are only meaningful within the context of a `crate::components::ClassDescription`.
///
/// Used to look up an `crate::components::AnnotationInfo` for a Keypoint within the `crate::components::AnnotationContext`.
#[doc = "A 16-bit ID representing a type of semantic keypoint within a class."]
#[doc = ""]
#[doc = "`KeypointId`s are only meaningful within the context of a `crate::components::ClassDescription`."]
#[doc = ""]
#[doc = "Used to look up an `crate::components::AnnotationInfo` for a Keypoint within the `crate::components::AnnotationContext`."]
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct KeypointId(pub u16);

Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/src/components/label.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A String label component.
#[doc = "A String label component."]
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[repr(transparent)]
pub struct Label(pub String);
Expand Down
4 changes: 2 additions & 2 deletions crates/re_types/src/components/point2d.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A point in 2D space.
#[doc = "A point in 2D space."]
#[derive(Debug, Default, Clone, Copy, PartialEq, PartialOrd)]
pub struct Point2D(pub crate::datatypes::Vec2D);

Expand All @@ -19,7 +19,7 @@ impl crate::Component for Point2D {
is_nullable: false,
metadata: [].into(),
}),
2,
2usize,
)
}
}
2 changes: 1 addition & 1 deletion crates/re_types/src/components/radius.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A Radius component.
#[doc = "A Radius component."]
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
pub struct Radius(pub f32);

Expand Down
6 changes: 3 additions & 3 deletions crates/re_types/src/datatypes/vec2d.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT.

/// A vector in 2D space.
#[doc = "A vector in 2D space."]
#[derive(Debug, Default, Clone, Copy, PartialEq, PartialOrd)]
pub struct Vec2D(pub [f32; 2]);
pub struct Vec2D(pub [f32; 2usize]);

impl crate::Datatype for Vec2D {
fn name() -> crate::DatatypeName {
Expand All @@ -19,7 +19,7 @@ impl crate::Datatype for Vec2D {
is_nullable: false,
metadata: [].into(),
}),
2,
2usize,
)
}
}

0 comments on commit f70680d

Please sign in to comment.