Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::GraphNodes Struct Reference

Archetype: A list of nodes in a graph with optional labels, colors, etc. More...

#include <rerun/archetypes/graph_nodes.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 GraphNodes (GraphNodes &&other)=default
 
 GraphNodes (Collection< rerun::components::GraphNode > _node_ids)
 
GraphNodes with_positions (Collection< rerun::components::Position2D > _positions) &&
 Optional center positions of the nodes.
 
GraphNodes with_colors (Collection< rerun::components::Color > _colors) &&
 Optional colors for the boxes.
 
GraphNodes with_labels (Collection< rerun::components::Text > _labels) &&
 Optional text labels for the node.
 
GraphNodes with_show_labels (rerun::components::ShowLabels _show_labels) &&
 Optional choice of whether the text labels should be shown by default.
 
GraphNodes with_radii (Collection< rerun::components::Radius > _radii) &&
 Optional radii for nodes.
 

Public Attributes

Collection< rerun::components::GraphNodenode_ids
 A list of node IDs.
 
std::optional< Collection< rerun::components::Position2D > > positions
 Optional center positions of the nodes.
 
std::optional< Collection< rerun::components::Color > > colors
 Optional colors for the boxes.
 
std::optional< Collection< rerun::components::Text > > labels
 Optional text labels for the node.
 
std::optional< rerun::components::ShowLabelsshow_labels
 Optional choice of whether the text labels should be shown by default.
 
std::optional< Collection< rerun::components::Radius > > radii
 Optional radii for nodes.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

Detailed Description

Archetype: A list of nodes in a graph with optional labels, colors, etc.

Example

Simple directed graph

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_graph_directed");
rec.spawn().exit_on_failure();
rec.log(
"simple",
rerun::GraphNodes({"a", "b", "c"})
.with_positions({{0.0, 100.0}, {-100.0, 0.0}, {100.0, 0.0}})
.with_labels({"A", "B", "C"}),
rerun::GraphEdges({{"a", "b"}, {"b", "c"}, {"c", "a"}})
// Graphs are undirected by default.
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
@ Directed
The graph has directed edges.
Archetype: A list of edges in a graph.
Definition graph_edges.hpp:47
Archetype: A list of nodes in a graph with optional labels, colors, etc.
Definition graph_nodes.hpp:49
GraphNodes with_positions(Collection< rerun::components::Position2D > _positions) &&
Optional center positions of the nodes.
Definition graph_nodes.hpp:83
GraphNodes with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the node.
Definition graph_nodes.hpp:97

Member Data Documentation

◆ IndicatorComponentName

constexpr const char rerun::archetypes::GraphNodes::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.components.GraphNodesIndicator"

The documentation for this struct was generated from the following file: