Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document all public item in re_types #6146

Merged
merged 26 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/re_data_ui/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,12 @@ fn tensor_pixel_value_ui(
3 => {
// TODO(jleibs): Track RGB ordering somehow -- don't just assume it
if let Some([r, g, b]) = match &tensor.buffer {
TensorBuffer::Nv12(_) => tensor.get_nv12_pixel(x, y),
TensorBuffer::Yuy2(_) => tensor.get_yuy2_pixel(x, y),
TensorBuffer::Nv12(_) => tensor
.get_nv12_pixel(x, y)
.map(|rgb| rgb.map(TensorElement::U8)),
TensorBuffer::Yuy2(_) => tensor
.get_yuy2_pixel(x, y)
.map(|rgb| rgb.map(TensorElement::U8)),
_ => {
if let [Some(r), Some(g), Some(b)] = [
tensor.get_with_image_coords(x, y, 0),
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/definitions/rerun/archetypes/boxes3d.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ table Boxes3D (
/// Optional center positions of the boxes.
centers: [rerun.components.Position3D] ("attr.rerun.component_recommended", nullable, order: 2000);

// Optional rotations of the boxes.
/// Optional rotations of the boxes.
rotations: [rerun.components.Rotation3D] ("attr.rerun.component_recommended", nullable, order: 2100);

/// Optional colors for the boxes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ namespace rerun.archetypes;
table DisconnectedSpace (
"attr.rust.derive": "Copy, PartialEq, Eq"
) {
/// Whether the entity path at which this is logged is disconnected from its parent.
disconnected_space: rerun.components.DisconnectedSpace ("attr.rerun.component_required", order: 1000);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ table ViewCoordinates (
"attr.rust.repr": "transparent",
"attr.docs.category": "Spatial 3D"
) {
/// The directions of the [x, y, z] axes.
xyz: rerun.components.ViewCoordinates ("attr.rerun.component_required", required, order: 1000);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ enum Corner2D: byte (
"attr.rerun.scope": "blueprint",
"attr.rust.derive": "Copy, PartialEq, Eq"
) {
/// Left top corner.
LeftTop,

/// Right top corner.
RightTop,

/// Left bottom corner.
LeftBottom,

/// Right bottom corner.
RightBottom (default),
}
19 changes: 19 additions & 0 deletions crates/re_types/definitions/rerun/components/marker_shape.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,33 @@ namespace rerun.components;
/// Shape of a marker.
enum MarkerShape: byte
{
/// `⏺`
Circle (default),

/// `◆`
Diamond,

/// `◼️`
Square,

/// `x`
Cross,

/// `+`
Plus,

/// `▲`
Up,

/// `▼`
Down,

/// `◀`
Left,

/// `▶`
Right,

/// `*`
Asterisk,
}
6 changes: 4 additions & 2 deletions crates/re_types/definitions/rerun/datatypes/angle.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ namespace rerun.datatypes;
union Angle (
"attr.rust.derive": "Copy, PartialEq"
) {
/// \py 3D rotation angle in radians. Only one of `degrees` or `radians` should be set.
/// Angle in radians. One turn is equal to 2π (or τ) radians.
/// \py Only one of `degrees` or `radians` should be set.
Radians: rerun.datatypes.Float32 (transparent),

/// \py 3D rotation angle in degrees. Only one of `degrees` or `radians` should be set.
/// Angle in degrees. One turn is equal to 360 degrees.
/// \py Only one of `degrees` or `radians` should be set.
Degrees: rerun.datatypes.Float32 (transparent),
}
3 changes: 3 additions & 0 deletions crates/re_types/definitions/rerun/datatypes/tensor_data.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ table TensorData (
"attr.python.array_aliases": "npt.ArrayLike",
"attr.rust.derive": "PartialEq,"
) {
/// The shape of the tensor, including optional names for each dimension.
shape: [rerun.datatypes.TensorDimension] (order: 200);

/// The content/data.
buffer: rerun.datatypes.TensorBuffer (order: 300);
}
4 changes: 4 additions & 0 deletions crates/re_types/definitions/rerun/datatypes/transform3d.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ namespace rerun.datatypes;
union Transform3D (
"attr.rust.derive": "Copy, PartialEq"
) {
/// Translation plus a 3x3 matrix for scale, rotation, skew, etc.
TranslationAndMat3x3: TranslationAndMat3x3,

/// Translation, rotation and scale, decomposed.
TranslationRotationScale: TranslationRotationScale3D,

// TODO(andreas): Raw 4x4 matrix.
}
3 changes: 2 additions & 1 deletion crates/re_types/definitions/rerun/datatypes/uuid.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ namespace rerun.datatypes;

// ---

/// A 16-byte uuid.
/// A 16-byte UUID.
struct Uuid (
"attr.arrow.transparent",
"attr.python.aliases": "npt.NDArray[Any], npt.ArrayLike, Sequence[int], bytes",
"attr.python.array_aliases": "npt.NDArray[Any], npt.ArrayLike, Sequence[Sequence[int]], Sequence[int], Sequence[bytes]",
"attr.rust.derive": "Default, Copy, PartialEq, Eq",
"attr.rust.repr": "transparent"
) {
/// The raw bytes representing the UUID.
bytes: [ubyte: 16] (order: 100);
}
3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/annotation_context.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions crates/re_types/src/archetypes/arrows2d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions crates/re_types/src/archetypes/arrows3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions crates/re_types/src/archetypes/asset3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/re_types/src/archetypes/bar_chart.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.