-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 2 commits.
# This is the 1st commit message: new color/keypoint/classid/label datatypes # This is the commit message #2: fixups
- Loading branch information
Showing
47 changed files
with
591 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.datatypes; | ||
|
||
// --- | ||
|
||
/// A 16-bit ID representing a type of semantic class. | ||
/// | ||
/// \rs Used to look up a [`crate::datatypes::ClassDescription`] within the [`crate::components::AnnotationContext`]. | ||
struct ClassId ( | ||
"attr.arrow.transparent", | ||
"attr.python.aliases": "int", | ||
"attr.python.array_aliases": "int, npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32], npt.NDArray[np.uint64]", | ||
"attr.rust.derive": "Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash", | ||
"attr.rust.repr": "transparent", | ||
"attr.rust.tuple_struct", | ||
"attr.rust.custom_clause": | ||
'cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))', | ||
order: 100 | ||
) { | ||
id: ushort (order: 100); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.datatypes; | ||
|
||
// --- | ||
|
||
/// An RGBA color tuple with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. | ||
/// | ||
/// \py Float colors are assumed to be in 0-1 gamma sRGB space. | ||
/// \py All other colors are assumed to be in 0-255 gamma sRGB space. | ||
/// \py If there is an alpha, we assume it is in linear space, and separate (NOT pre-multiplied). | ||
struct Color ( | ||
"attr.arrow.transparent", | ||
"attr.python.aliases": "int, Sequence[int], npt.NDArray[Union[np.uint8, np.float32, np.float64]]", | ||
"attr.python.array_aliases": "int, Sequence[Sequence[int]], npt.NDArray[Union[np.uint8, np.uint32, np.float32, np.float64]]", | ||
"attr.rust.derive": "Default, Copy, PartialEq, Eq, PartialOrd, Ord, bytemuck::Pod, bytemuck::Zeroable", | ||
"attr.rust.repr": "transparent", | ||
"attr.rust.tuple_struct", | ||
order: 100 | ||
) { | ||
rgba: uint (order: 100); | ||
} |
33 changes: 33 additions & 0 deletions
33
crates/re_types/definitions/rerun/datatypes/keypoint_id.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.datatypes; | ||
|
||
// --- | ||
|
||
/// A 16-bit ID representing a type of semantic keypoint within a class. | ||
/// | ||
/// \py `KeypointId`s are only meaningful within the context of a [`rerun.components.ClassDescription`][]. | ||
/// \py | ||
/// \py Used to look up an [`rerun.components.AnnotationInfo`][] for a Keypoint within the | ||
/// \py [`rerun.components.AnnotationContext`]. | ||
/// | ||
/// \rs `KeypointId`s are only meaningful within the context of a `crate::components::ClassDescription`. | ||
/// \rs | ||
/// \rs Used to look up an `crate::components::AnnotationInfo` for a Keypoint within the `crate::components::AnnotationContext`. | ||
struct KeypointId ( | ||
"attr.arrow.transparent", | ||
"attr.python.aliases": "int", | ||
"attr.python.array_aliases": "int, npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32], npt.NDArray[np.uint64]", | ||
"attr.rust.derive": "Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash", | ||
"attr.rust.repr": "transparent", | ||
"attr.rust.tuple_struct", | ||
"attr.rust.custom_clause": | ||
'cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))', | ||
order: 200 | ||
) { | ||
id: ushort (order: 100); | ||
} |
9 changes: 4 additions & 5 deletions
9
crates/re_types/definitions/rerun/datatypes/keypoint_pair.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
include "arrow/attributes.fbs"; | ||
include "fbs/attributes.fbs"; | ||
|
||
// Include components directly to avoid circular dependencies. | ||
include "rerun/components/keypoint_id.fbs"; | ||
include "rerun/datatypes.fbs"; | ||
|
||
namespace rerun.datatypes; | ||
|
||
// --- | ||
|
||
/// A connection between two `Keypoints`. | ||
table KeypointPair ( | ||
"attr.python.aliases": "Sequence[components.KeypointIdLike]", | ||
"attr.python.aliases": "Sequence[datatypes.KeypointIdLike]", | ||
"attr.rust.derive": "Default, Eq, PartialEq", | ||
order: 100 | ||
) { | ||
keypoint0: rerun.components.KeypointId (order: 100); | ||
keypoint1: rerun.components.KeypointId (order: 200); | ||
keypoint0: rerun.datatypes.KeypointId (order: 100); | ||
keypoint1: rerun.datatypes.KeypointId (order: 200); | ||
} |
Oops, something went wrong.