6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../components/class_id.hpp"
9#include "../components/color.hpp"
10#include "../components/draw_order.hpp"
11#include "../components/half_sizes2d.hpp"
12#include "../components/instance_key.hpp"
13#include "../components/position2d.hpp"
14#include "../components/radius.hpp"
15#include "../components/text.hpp"
16#include "../data_cell.hpp"
17#include "../indicator_component.hpp"
18#include "../result.hpp"
51 std::optional<Collection<rerun::components::Position2D>>
centers;
54 std::optional<Collection<rerun::components::Color>>
colors;
57 std::optional<Collection<rerun::components::Radius>>
radii;
60 std::optional<Collection<rerun::components::Text>>
labels;
72 std::optional<Collection<rerun::components::ClassId>>
class_ids;
75 std::optional<Collection<rerun::components::InstanceKey>>
instance_keys;
78 static constexpr const char IndicatorComponentName[] =
"rerun.components.Boxes2DIndicator";
129 const std::vector<datatypes::Vec2D>& mins,
const std::vector<datatypes::Vec2D>& sizes
140 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
145 colors = std::move(_colors);
147 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
152 radii = std::move(_radii);
154 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
159 labels = std::move(_labels);
161 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
172 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
181 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
188 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
201 template <
typename T>
206 struct AsComponents<archetypes::Boxes2D> {
208 static Result<std::vector<DataCell>> serialize(
const archetypes::Boxes2D& archetype);
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:47
size_t size() const
Returns the number of instances in this collection.
Definition collection.hpp:254
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:66
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Archetype: 2D boxes with half-extents and optional center, rotations, rotations, colors etc.
Definition boxes2d.hpp:46
Boxes2D with_instance_keys(Collection< rerun::components::InstanceKey > _instance_keys) &&
Unique identifiers for each individual boxes in the batch.
Definition boxes2d.hpp:185
Collection< rerun::components::HalfSizes2D > half_sizes
All half-extents that make up the batch of boxes.
Definition boxes2d.hpp:48
static Boxes2D from_half_sizes(Collection< components::HalfSizes2D > half_sizes)
Creates new Boxes2D with half_sizes centered around the local origin.
Definition boxes2d.hpp:87
std::optional< Collection< rerun::components::Text > > labels
Optional text labels for the boxes.
Definition boxes2d.hpp:60
std::optional< Collection< rerun::components::InstanceKey > > instance_keys
Unique identifiers for each individual boxes in the batch.
Definition boxes2d.hpp:75
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:54
Boxes2D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the boxes.
Definition boxes2d.hpp:144
size_t num_instances() const
Returns the number of primary instances of this archetype.
Definition boxes2d.hpp:192
std::optional< Collection< rerun::components::Radius > > radii
Optional radii for the lines that make up the boxes.
Definition boxes2d.hpp:57
Boxes2D with_draw_order(rerun::components::DrawOrder _draw_order) &&
An optional floating point value that specifies the 2D drawing order.
Definition boxes2d.hpp:169
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:115
static Boxes2D from_centers_and_half_sizes(Collection< components::Position2D > centers, Collection< components::HalfSizes2D > half_sizes)
Creates new Boxes2D with centers and half_sizes.
Definition boxes2d.hpp:94
Boxes2D with_class_ids(Collection< rerun::components::ClassId > _class_ids) &&
Optional ClassIds for the boxes.
Definition boxes2d.hpp:178
static Boxes2D from_sizes(const std::vector< datatypes::Vec2D > &sizes)
Creates new Boxes2D with half_sizes created from (full) sizes.
std::optional< Collection< rerun::components::Position2D > > centers
Optional center positions of the boxes.
Definition boxes2d.hpp:51
std::optional< Collection< rerun::components::ClassId > > class_ids
Optional ClassIds for the boxes.
Definition boxes2d.hpp:72
Boxes2D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the boxes.
Definition boxes2d.hpp:158
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:67
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 used for the display order of 2D elements.
Definition draw_order.hpp:30
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:23