|
Rerun C++ SDK
|
Archetype: 2D boxes with half-extents and optional center, colors etc. More...
#include <rerun/archetypes/boxes2d.hpp>
Public Types | |
| using | IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName > |
| Indicator component, used to identify the archetype when converting to a list of components. | |
Public Member Functions | |
| Boxes2D (Boxes2D &&other)=default | |
| Boxes2D (const Boxes2D &other)=default | |
| Boxes2D & | operator= (const Boxes2D &other)=default |
| Boxes2D & | operator= (Boxes2D &&other)=default |
| Boxes2D | with_half_sizes (const Collection< rerun::components::HalfSize2D > &_half_sizes) && |
| All half-extents that make up the batch of boxes. | |
| Boxes2D | with_centers (const Collection< rerun::components::Position2D > &_centers) && |
| Optional center positions of the boxes. | |
| Boxes2D | with_colors (const Collection< rerun::components::Color > &_colors) && |
| Optional colors for the boxes. | |
| Boxes2D | with_radii (const Collection< rerun::components::Radius > &_radii) && |
| Optional radii for the lines that make up the boxes. | |
| Boxes2D | with_labels (const Collection< rerun::components::Text > &_labels) && |
| Optional text labels for the boxes. | |
| Boxes2D | with_show_labels (const rerun::components::ShowLabels &_show_labels) && |
| Optional choice of whether the text labels should be shown by default. | |
| Boxes2D | with_many_show_labels (const Collection< rerun::components::ShowLabels > &_show_labels) && |
This method makes it possible to pack multiple show_labels in a single component batch. | |
| Boxes2D | with_draw_order (const rerun::components::DrawOrder &_draw_order) && |
| An optional floating point value that specifies the 2D drawing order. | |
| Boxes2D | with_many_draw_order (const Collection< rerun::components::DrawOrder > &_draw_order) && |
This method makes it possible to pack multiple draw_order in a single component batch. | |
| Boxes2D | with_class_ids (const Collection< rerun::components::ClassId > &_class_ids) && |
Optional components::ClassIds for the boxes. | |
| Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
| Partitions the component data into multiple sub-batches. | |
| Collection< ComponentColumn > | columns () |
| Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
| static Boxes2D | from_half_sizes (Collection< components::HalfSize2D > half_sizes) |
Creates new Boxes2D with half_sizes centered around the local origin. | |
| static Boxes2D | from_centers_and_half_sizes (Collection< components::Position2D > centers, Collection< components::HalfSize2D > half_sizes) |
Creates new Boxes2D with centers and half_sizes. | |
| static Boxes2D | from_sizes (const std::vector< datatypes::Vec2D > &sizes) |
Creates new Boxes2D with half_sizes created from (full) sizes. | |
| static Boxes2D | from_centers_and_sizes (Collection< components::Position2D > centers, const std::vector< datatypes::Vec2D > &sizes) |
Creates new Boxes2D with centers and half_sizes created from centers and (full) sizes. | |
| static Boxes2D | from_mins_and_sizes (const std::vector< datatypes::Vec2D > &mins, const std::vector< datatypes::Vec2D > &sizes) |
Creates new Boxes2D with half_sizes and centers created from minimums and (full) sizes. | |
| static Boxes2D | update_fields () |
Update only some specific fields of a Boxes2D. | |
| static Boxes2D | clear_fields () |
Clear all the fields of a Boxes2D. | |
Public Attributes | |
| std::optional< ComponentBatch > | half_sizes |
| All half-extents that make up the batch of boxes. | |
| std::optional< ComponentBatch > | centers |
| Optional center positions of the boxes. | |
| std::optional< ComponentBatch > | colors |
| Optional colors for the boxes. | |
| std::optional< ComponentBatch > | radii |
| Optional radii for the lines that make up the boxes. | |
| std::optional< ComponentBatch > | labels |
| Optional text labels for the boxes. | |
| std::optional< ComponentBatch > | show_labels |
| Optional choice of whether the text labels should be shown by default. | |
| std::optional< ComponentBatch > | draw_order |
| An optional floating point value that specifies the 2D drawing order. | |
| std::optional< ComponentBatch > | class_ids |
Optional components::ClassIds for the boxes. | |
Static Public Attributes | |
| static constexpr const char | IndicatorComponentName [] = "rerun.components.Boxes2DIndicator" |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.Boxes2D" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_half_sizes |
ComponentDescriptor for the half_sizes field. | |
| static constexpr auto | Descriptor_centers |
ComponentDescriptor for the centers field. | |
| static constexpr auto | Descriptor_colors |
ComponentDescriptor for the colors field. | |
| static constexpr auto | Descriptor_radii |
ComponentDescriptor for the radii field. | |
| static constexpr auto | Descriptor_labels |
ComponentDescriptor for the labels field. | |
| static constexpr auto | Descriptor_show_labels |
ComponentDescriptor for the show_labels field. | |
| static constexpr auto | Descriptor_draw_order |
ComponentDescriptor for the draw_order field. | |
| static constexpr auto | Descriptor_class_ids |
ComponentDescriptor for the class_ids field. | |
Archetype: 2D boxes with half-extents and optional center, colors etc.

|
static |
Creates new Boxes2D with half_sizes created from (full) sizes.
TODO(#3285): Does not preserve data as-is and instead creates half-sizes from the input data.
|
inlinestatic |
Creates new Boxes2D with centers and half_sizes created from centers and (full) sizes.
TODO(#3285): Does not preserve data as-is and instead creates centers and half-sizes from the input data.
|
static |
Creates new Boxes2D with half_sizes and centers created from minimums and (full) sizes.
TODO(#3285): Does not preserve data as-is and instead creates centers and half-sizes from the input data.
|
inline |
Optional text labels for the boxes.
If there's a single label present, it will be placed at the center of the entity. Otherwise, each instance will have its own label.
|
inline |
This method makes it possible to pack multiple show_labels in a single component batch.
This only makes sense when used in conjunction with columns. with_show_labels should be used when logging a single row's worth of data.
|
inline |
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 boxes is 10.0.
|
inline |
This method makes it possible to pack multiple draw_order in a single component batch.
This only makes sense when used in conjunction with columns. with_draw_order should be used when logging a single row's worth of data.
|
inline |
Optional components::ClassIds for the boxes.
The components::ClassId provides colors and labels if not specified explicitly.
| Collection< ComponentColumn > rerun::archetypes::Boxes2D::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.
This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
The specified lengths must sum to the total length of the component batch.
| Collection< ComponentColumn > rerun::archetypes::Boxes2D::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.
| std::optional<ComponentBatch> rerun::archetypes::Boxes2D::labels |
Optional text labels for the boxes.
If there's a single label present, it will be placed at the center of the entity. Otherwise, each instance will have its own label.
| std::optional<ComponentBatch> rerun::archetypes::Boxes2D::draw_order |
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 boxes is 10.0.
| std::optional<ComponentBatch> rerun::archetypes::Boxes2D::class_ids |
Optional components::ClassIds for the boxes.
The components::ClassId provides colors and labels if not specified explicitly.
|
staticconstexpr |
ComponentDescriptor for the half_sizes field.
|
staticconstexpr |
ComponentDescriptor for the centers field.
|
staticconstexpr |
ComponentDescriptor for the colors field.
|
staticconstexpr |
ComponentDescriptor for the radii field.
|
staticconstexpr |
ComponentDescriptor for the labels field.
|
staticconstexpr |
ComponentDescriptor for the show_labels field.
|
staticconstexpr |
ComponentDescriptor for the draw_order field.
|
staticconstexpr |
ComponentDescriptor for the class_ids field.