Archetype: 2D boxes with half-extents and optional center, colors etc.
More...
#include <rerun/archetypes/boxes2d.hpp>
Archetype: 2D boxes with half-extents and optional center, colors etc.
Example
Simple 2D boxes

#include <rerun.hpp>
int main() {
rec.spawn().exit_on_failure();
rec.log("simple", rerun::Boxes2D::from_mins_and_sizes({{-1.f, -1.f}}, {{2.f, 2.f}}));
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
◆ from_sizes()
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.
◆ from_centers_and_sizes()
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.
◆ from_mins_and_sizes()
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.
◆ with_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.
◆ with_many_show_labels()
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.
◆ with_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.
◆ with_many_draw_order()
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.
◆ with_class_ids()
◆ columns() [1/2]
◆ columns() [2/2]
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.
◆ 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.
◆ 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.
◆ class_ids
◆ Descriptor_half_sizes
constexpr auto rerun::archetypes::Boxes2D::Descriptor_half_sizes |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
Loggable<rerun::components::HalfSize2D>::Descriptor.component_name
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition boxes2d.hpp:83
ComponentDescriptor
for the half_sizes
field.
◆ Descriptor_centers
constexpr auto rerun::archetypes::Boxes2D::Descriptor_centers |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
Loggable<rerun::components::Position2D>::Descriptor.component_name
)
ComponentDescriptor
for the centers
field.
◆ Descriptor_colors
constexpr auto rerun::archetypes::Boxes2D::Descriptor_colors |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
ArchetypeName,
"colors", Loggable<rerun::components::Color>::Descriptor.component_name
)
ComponentDescriptor
for the colors
field.
◆ Descriptor_radii
constexpr auto rerun::archetypes::Boxes2D::Descriptor_radii |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
ArchetypeName,
"radii", Loggable<rerun::components::Radius>::Descriptor.component_name
)
ComponentDescriptor
for the radii
field.
◆ Descriptor_labels
constexpr auto rerun::archetypes::Boxes2D::Descriptor_labels |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
ArchetypeName,
"labels", Loggable<rerun::components::Text>::Descriptor.component_name
)
ComponentDescriptor
for the labels
field.
◆ Descriptor_show_labels
constexpr auto rerun::archetypes::Boxes2D::Descriptor_show_labels |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
Loggable<rerun::components::ShowLabels>::Descriptor.component_name
)
ComponentDescriptor
for the show_labels
field.
◆ Descriptor_draw_order
constexpr auto rerun::archetypes::Boxes2D::Descriptor_draw_order |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
Loggable<rerun::components::DrawOrder>::Descriptor.component_name
)
ComponentDescriptor
for the draw_order
field.
◆ Descriptor_class_ids
constexpr auto rerun::archetypes::Boxes2D::Descriptor_class_ids |
|
staticconstexpr |
Initial value:= ComponentDescriptor(
Loggable<rerun::components::ClassId>::Descriptor.component_name
)
ComponentDescriptor
for the class_ids
field.
The documentation for this struct was generated from the following file: