6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../components/class_id.hpp"
9#include "../components/color.hpp"
10#include "../components/half_sizes3d.hpp"
11#include "../components/instance_key.hpp"
12#include "../components/position3d.hpp"
13#include "../components/radius.hpp"
14#include "../components/rotation3d.hpp"
15#include "../components/text.hpp"
16#include "../data_cell.hpp"
17#include "../indicator_component.hpp"
18#include "../result.hpp"
67 std::optional<Collection<rerun::components::Position3D>>
centers;
69 std::optional<Collection<rerun::components::Rotation3D>> rotations;
72 std::optional<Collection<rerun::components::Color>>
colors;
75 std::optional<Collection<rerun::components::Radius>>
radii;
78 std::optional<Collection<rerun::components::Text>>
labels;
83 std::optional<Collection<rerun::components::ClassId>>
class_ids;
86 std::optional<Collection<rerun::components::InstanceKey>>
instance_keys;
89 static constexpr const char IndicatorComponentName[] =
"rerun.components.Boxes3DIndicator";
143 const std::vector<datatypes::Vec3D>& mins,
const std::vector<datatypes::Vec3D>& sizes
154 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
158 rotations = std::move(_rotations);
160 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
165 colors = std::move(_colors);
167 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
172 radii = std::move(_radii);
174 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
179 labels = std::move(_labels);
181 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
190 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
197 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
210 template <
typename T>
215 struct AsComponents<archetypes::Boxes3D> {
217 static Result<std::vector<DataCell>> serialize(
const archetypes::Boxes3D& 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: 3D boxes with half-extents and optional center, rotations, rotations, colors etc.
Definition boxes3d.hpp:62
size_t num_instances() const
Returns the number of primary instances of this archetype.
Definition boxes3d.hpp:201
std::optional< Collection< rerun::components::ClassId > > class_ids
Optional ClassIds for the boxes.
Definition boxes3d.hpp:83
std::optional< Collection< rerun::components::Text > > labels
Optional text labels for the boxes.
Definition boxes3d.hpp:78
Boxes3D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the boxes.
Definition boxes3d.hpp:164
static Boxes3D from_sizes(const std::vector< datatypes::Vec3D > &sizes)
Creates new Boxes3D with half_sizes created from (full) sizes.
Boxes3D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the boxes.
Definition boxes3d.hpp:178
std::optional< Collection< rerun::components::InstanceKey > > instance_keys
Unique identifiers for each individual boxes in the batch.
Definition boxes3d.hpp:86
Boxes3D with_instance_keys(Collection< rerun::components::InstanceKey > _instance_keys) &&
Unique identifiers for each individual boxes in the batch.
Definition boxes3d.hpp:194
static Boxes3D from_centers_and_sizes(Collection< components::Position3D > centers, const std::vector< datatypes::Vec3D > &sizes)
Creates new Boxes3D with centers and half_sizes created from centers and (full) sizes.
Definition boxes3d.hpp:128
Collection< rerun::components::HalfSizes3D > half_sizes
All half-extents that make up the batch of boxes.
Definition boxes3d.hpp:64
static Boxes3D from_half_sizes(Collection< components::HalfSizes3D > half_sizes)
Creates new Boxes3D with half_sizes centered around the local origin.
Definition boxes3d.hpp:98
std::optional< Collection< rerun::components::Radius > > radii
Optional radii for the lines that make up the boxes.
Definition boxes3d.hpp:75
static Boxes3D from_centers_and_half_sizes(Collection< components::Position3D > centers, Collection< components::HalfSizes3D > half_sizes)
Creates new Boxes3D with centers and half_sizes.
Definition boxes3d.hpp:105
std::optional< Collection< rerun::components::Color > > colors
Optional colors for the boxes.
Definition boxes3d.hpp:72
Boxes3D with_class_ids(Collection< rerun::components::ClassId > _class_ids) &&
Optional ClassIds for the boxes.
Definition boxes3d.hpp:187
Boxes3D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the lines that make up the boxes.
Definition boxes3d.hpp:171
Boxes3D with_centers(Collection< rerun::components::Position3D > _centers) &&
Optional center positions of the boxes.
Definition boxes3d.hpp:151
static Boxes3D from_mins_and_sizes(const std::vector< datatypes::Vec3D > &mins, const std::vector< datatypes::Vec3D > &sizes)
Creates new Boxes3D with half_sizes and centers created from minimums and (full) sizes.
std::optional< Collection< rerun::components::Position3D > > centers
Optional center positions of the boxes.
Definition boxes3d.hpp:67
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:23