6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../component_column.hpp"
9#include "../components/color.hpp"
10#include "../components/graph_node.hpp"
11#include "../components/position2d.hpp"
12#include "../components/radius.hpp"
13#include "../components/show_labels.hpp"
14#include "../components/text.hpp"
15#include "../result.hpp"
56 std::optional<ComponentBatch>
colors;
59 std::optional<ComponentBatch>
labels;
68 std::optional<ComponentBatch>
radii;
72 static constexpr const char ArchetypeName[] =
"rerun.archetypes.GraphNodes";
111 .value_or_throw()) {}
125 return std::move(*
this);
132 return std::move(*
this);
138 return std::move(*
this);
144 return std::move(*
this);
154 return std::move(*
this);
166 return std::move(*
this);
172 return std::move(*
this);
196 template <
typename T>
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:76
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: A list of nodes in a graph with optional labels, colors, etc.
Definition graph_nodes.hpp:48
static constexpr auto Descriptor_labels
ComponentDescriptor for the labels field.
Definition graph_nodes.hpp:89
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition graph_nodes.hpp:85
std::optional< ComponentBatch > labels
Optional text labels for the node.
Definition graph_nodes.hpp:59
static GraphNodes clear_fields()
Clear all the fields of a GraphNodes.
static constexpr auto Descriptor_show_labels
ComponentDescriptor for the show_labels field.
Definition graph_nodes.hpp:93
GraphNodes with_show_labels(const rerun::components::ShowLabels &_show_labels) &&
Whether the text labels should be shown.
Definition graph_nodes.hpp:151
static GraphNodes update_fields()
Update only some specific fields of a GraphNodes.
Definition graph_nodes.hpp:114
static constexpr auto Descriptor_positions
ComponentDescriptor for the positions field.
Definition graph_nodes.hpp:80
static constexpr auto Descriptor_node_ids
ComponentDescriptor for the node_ids field.
Definition graph_nodes.hpp:75
std::optional< ComponentBatch > radii
Optional radii for nodes.
Definition graph_nodes.hpp:68
std::optional< ComponentBatch > colors
Optional colors for the boxes.
Definition graph_nodes.hpp:56
std::optional< ComponentBatch > show_labels
Whether the text labels should be shown.
Definition graph_nodes.hpp:65
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
GraphNodes with_labels(const Collection< rerun::components::Text > &_labels) &&
Optional text labels for the node.
Definition graph_nodes.hpp:142
GraphNodes with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the boxes.
Definition graph_nodes.hpp:136
static constexpr auto Descriptor_radii
ComponentDescriptor for the radii field.
Definition graph_nodes.hpp:98
GraphNodes with_positions(const Collection< rerun::components::Position2D > &_positions) &&
Optional center positions of the nodes.
Definition graph_nodes.hpp:129
std::optional< ComponentBatch > node_ids
A list of node IDs.
Definition graph_nodes.hpp:50
GraphNodes with_radii(const Collection< rerun::components::Radius > &_radii) &&
Optional radii for nodes.
Definition graph_nodes.hpp:170
GraphNodes 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.
Definition graph_nodes.hpp:161
GraphNodes with_node_ids(const Collection< rerun::components::GraphNode > &_node_ids) &&
A list of node IDs.
Definition graph_nodes.hpp:122
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition graph_nodes.hpp:72
std::optional< ComponentBatch > positions
Optional center positions of the nodes.
Definition graph_nodes.hpp:53
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:18