-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,858 additions
and
23 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
crates/store/re_types/definitions/rerun/archetypes/capsules3d.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,71 @@ | ||
namespace rerun.archetypes; | ||
|
||
// --- | ||
|
||
/// 3D capsules; cylinders with hemispherical caps. | ||
/// | ||
/// Capsules are defined by two endpoints (the centers of their end cap spheres), which are located | ||
/// at (0, 0, 0) and (0, 0, length), that is, extending along the positive direction of the Z axis. | ||
/// Capsules in other orientations may be produced by applying a rotation to the entity or | ||
/// instances. | ||
// | ||
// TODO: Needs an example image. | ||
// TODO(#1361): This archetype should eventually generalize to cylinders without caps, truncated | ||
// cones, and tapered capsules -- all common shapes based on expanding a line segment circularly. | ||
table Capsules3D ( | ||
"attr.rust.derive": "PartialEq", | ||
"attr.rust.new_pub_crate", | ||
"attr.cpp.no_field_ctors", | ||
"attr.docs.category": "Spatial 3D", | ||
"attr.docs.view_types": "Spatial3DView, Spatial2DView: if logged above active projection", | ||
"attr.docs.unreleased" | ||
) { | ||
// --- Required --- | ||
|
||
/// The shape of the capsule defined as the length of the line between its endpoints. | ||
lengths: [rerun.components.Length] ("attr.rerun.component_required", order: 1000); | ||
|
||
/// Radius of the capsules. | ||
// | ||
// TODO(#1361): This should eventually become two radii, to generate truncated cones and tapered capsules. | ||
radii: [rerun.components.Radius] ("attr.rerun.component_required", order: 1100); | ||
|
||
// --- Recommended --- | ||
|
||
/// Optional translations of the capsules. | ||
/// | ||
/// If not specified, one end of each capsule will be at (0, 0, 0). | ||
/// Note that this uses a [components.PoseTranslation3D] which is also used by [archetypes.InstancePoses3D]. | ||
translations: [rerun.components.PoseTranslation3D] ("attr.rerun.component_recommended", nullable, order: 2000); | ||
|
||
/// Rotations via axis + angle. | ||
/// | ||
/// If no rotation is specified, the capsules align with the +Z axis of the local coordinate system. | ||
/// Note that this uses a [components.PoseRotationAxisAngle] which is also used by [archetypes.InstancePoses3D]. | ||
rotation_axis_angles: [rerun.components.PoseRotationAxisAngle] ("attr.rerun.component_optional", nullable, order: 2100); | ||
|
||
/// Rotations via quaternion. | ||
/// | ||
/// If no rotation is specified, the capsules align with the +Z axis of the local coordinate system. | ||
/// Note that this uses a [components.PoseRotationQuat] which is also used by [archetypes.InstancePoses3D]. | ||
quaternions: [rerun.components.PoseRotationQuat] ("attr.rerun.component_optional", nullable, order: 2200); | ||
|
||
/// Optional colors for the capsules. | ||
colors: [rerun.components.Color] ("attr.rerun.component_recommended", nullable, order: 2300); | ||
|
||
// --- Optional --- | ||
|
||
// TODO(#1361): Add fill_mode component, or whatever succeeds it in case a wireframe | ||
// or other alternate rendering is wanted. | ||
|
||
/// Optional text labels for the capsules, which will be located at their centers. | ||
labels: [rerun.components.Text] ("attr.rerun.component_optional", nullable, order: 3100); | ||
|
||
/// Optional choice of whether the text labels should be shown by default. | ||
show_labels: rerun.components.ShowLabels ("attr.rerun.component_optional", nullable, order: 3200); | ||
|
||
/// Optional class ID for the ellipsoids. | ||
/// | ||
/// The class ID provides colors and labels if not specified explicitly. | ||
class_ids: [rerun.components.ClassId] ("attr.rerun.component_optional", nullable, order: 3300); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
crates/store/re_types/definitions/rerun/components/length.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,16 @@ | ||
namespace rerun.components; | ||
|
||
// --- | ||
|
||
/// Length, or one-dimensional size. | ||
/// | ||
/// Measured in its local coordinate system; consult the archetype in use to determine which | ||
/// axis or part of the entity this is the length of. | ||
struct Length ( | ||
"attr.python.aliases": "float", | ||
"attr.python.array_aliases": "float, npt.NDArray[np.float32]", | ||
"attr.rust.derive": "Copy, PartialEq, PartialOrd, bytemuck::Pod, bytemuck::Zeroable", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
length: rerun.datatypes.Float32 (order: 100); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.