6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/class_id.hpp"
10#include "../components/color.hpp"
11#include "../components/draw_order.hpp"
12#include "../components/half_size2d.hpp"
13#include "../components/position2d.hpp"
14#include "../components/radius.hpp"
15#include "../components/show_labels.hpp"
16#include "../components/text.hpp"
17#include "../indicator_component.hpp"
18#include "../result.hpp"
48 std::optional<Collection<rerun::components::Position2D>>
centers;
51 std::optional<Collection<rerun::components::Color>>
colors;
54 std::optional<Collection<rerun::components::Radius>>
radii;
60 std::optional<Collection<rerun::components::Text>>
labels;
75 std::optional<Collection<rerun::components::ClassId>>
class_ids;
78 static constexpr const char IndicatorComponentName[] =
"rerun.components.Boxes2DIndicator";
127 const std::vector<datatypes::Vec2D>& mins,
const std::vector<datatypes::Vec2D>& sizes
140 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
145 colors = std::move(_colors);
147 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
152 radii = std::move(_radii);
154 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
162 labels = std::move(_labels);
164 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
171 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
182 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
191 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
199 template <
typename T>
204 struct AsComponents<archetypes::Boxes2D> {
206 static Result<std::vector<ComponentBatch>> serialize(
const archetypes::Boxes2D& archetype);
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Archetype: 2D boxes with half-extents and optional center, colors etc.
Definition boxes2d.hpp:43
std::optional< Collection< rerun::components::Text > > labels
Optional text labels for the boxes.
Definition boxes2d.hpp:60
Boxes2D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the lines that make up the boxes.
Definition boxes2d.hpp:151
std::optional< Collection< rerun::components::Color > > colors
Optional colors for the boxes.
Definition boxes2d.hpp:51
Boxes2D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the boxes.
Definition boxes2d.hpp:144
Collection< rerun::components::HalfSize2D > half_sizes
All half-extents that make up the batch of boxes.
Definition boxes2d.hpp:45
std::optional< Collection< rerun::components::Radius > > radii
Optional radii for the lines that make up the boxes.
Definition boxes2d.hpp:54
Boxes2D with_show_labels(rerun::components::ShowLabels _show_labels) &&
Optional choice of whether the text labels should be shown by default.
Definition boxes2d.hpp:168
Boxes2D with_draw_order(rerun::components::DrawOrder _draw_order) &&
An optional floating point value that specifies the 2D drawing order.
Definition boxes2d.hpp:179
std::optional< rerun::components::ShowLabels > show_labels
Optional choice of whether the text labels should be shown by default.
Definition boxes2d.hpp:63
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.
Definition boxes2d.hpp:113
Boxes2D with_class_ids(Collection< rerun::components::ClassId > _class_ids) &&
Optional components::ClassIds for the boxes.
Definition boxes2d.hpp:188
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_half_sizes(Collection< components::Position2D > centers, Collection< components::HalfSize2D > half_sizes)
Creates new Boxes2D with centers and half_sizes.
Definition boxes2d.hpp:92
std::optional< Collection< rerun::components::Position2D > > centers
Optional center positions of the boxes.
Definition boxes2d.hpp:48
std::optional< Collection< rerun::components::ClassId > > class_ids
Optional components::ClassIds for the boxes.
Definition boxes2d.hpp:75
Boxes2D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the boxes.
Definition boxes2d.hpp:161
Boxes2D with_centers(Collection< rerun::components::Position2D > _centers) &&
Optional center positions of the boxes.
Definition boxes2d.hpp:137
std::optional< rerun::components::DrawOrder > draw_order
An optional floating point value that specifies the 2D drawing order.
Definition boxes2d.hpp:70
static Boxes2D from_half_sizes(Collection< components::HalfSize2D > half_sizes)
Creates new Boxes2D with half_sizes centered around the local origin.
Definition boxes2d.hpp:85
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.
Component: Draw order of 2D elements.
Definition draw_order.hpp:20
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:19