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

Archetype: 2D arrows with optional colors, radii, labels, etc. More...

#include <rerun/archetypes/arrows2d.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

 Arrows2D (Arrows2D &&other)=default
 
Arrows2D with_origins (Collection< rerun::components::Position2D > _origins) &&
 All the origin (base) positions for each arrow in the batch.
 
Arrows2D with_radii (Collection< rerun::components::Radius > _radii) &&
 Optional radii for the arrows.
 
Arrows2D with_colors (Collection< rerun::components::Color > _colors) &&
 Optional colors for the points.
 
Arrows2D with_labels (Collection< rerun::components::Text > _labels) &&
 Optional text labels for the arrows.
 
Arrows2D with_show_labels (rerun::components::ShowLabels _show_labels) &&
 Optional choice of whether the text labels should be shown by default.
 
Arrows2D with_draw_order (rerun::components::DrawOrder _draw_order) &&
 An optional floating point value that specifies the 2D drawing order.
 
Arrows2D with_class_ids (Collection< rerun::components::ClassId > _class_ids) &&
 Optional class Ids for the points.
 

Static Public Member Functions

static Arrows2D from_vectors (Collection< components::Vector2D > vectors_)
 Creates new 2D arrows pointing in the given directions, with a base at the origin (0, 0).
 

Public Attributes

Collection< rerun::components::Vector2Dvectors
 All the vectors for each arrow in the batch.
 
std::optional< Collection< rerun::components::Position2D > > origins
 All the origin (base) positions for each arrow in the batch.
 
std::optional< Collection< rerun::components::Radius > > radii
 Optional radii for the arrows.
 
std::optional< Collection< rerun::components::Color > > colors
 Optional colors for the points.
 
std::optional< Collection< rerun::components::Text > > labels
 Optional text labels for the arrows.
 
std::optional< rerun::components::ShowLabelsshow_labels
 Optional choice of whether the text labels should be shown by default.
 
std::optional< rerun::components::DrawOrderdraw_order
 An optional floating point value that specifies the 2D drawing order.
 
std::optional< Collection< rerun::components::ClassId > > class_ids
 Optional class Ids for the points.
 

Static Public Attributes

static constexpr const char IndicatorComponentName [] = "rerun.components.Arrows2DIndicator"
 

Detailed Description

Archetype: 2D arrows with optional colors, radii, labels, etc.

Example

Simple batch of 2D arrows

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_arrow2d");
rec.spawn().exit_on_failure();
rec.log(
"arrows",
rerun::Arrows2D::from_vectors({{1.0f, 0.0f}, {0.0f, -1.0f}, {-0.7f, 0.7f}})
.with_radii(0.025f)
.with_origins({{0.25f, 0.0f}, {0.25f, 0.0f}, {-0.1f, -0.1f}})
.with_colors({{255, 0, 0}, {0, 255, 0}, {127, 0, 255}})
.with_labels({"right", "up", "left-down"})
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
Arrows2D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the arrows.
Definition arrows2d.hpp:120
Arrows2D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the points.
Definition arrows2d.hpp:127
Arrows2D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the arrows.
Definition arrows2d.hpp:137
Arrows2D with_origins(Collection< rerun::components::Position2D > _origins) &&
All the origin (base) positions for each arrow in the batch.
Definition arrows2d.hpp:110

Member Function Documentation

◆ with_origins()

Arrows2D rerun::archetypes::Arrows2D::with_origins ( Collection< rerun::components::Position2D _origins) &&
inline

All the origin (base) positions for each arrow in the batch.

If no origins are set, (0, 0) is used as the origin for each arrow.

◆ with_radii()

Arrows2D rerun::archetypes::Arrows2D::with_radii ( Collection< rerun::components::Radius _radii) &&
inline

Optional radii for the arrows.

The shaft is rendered as a line with radius = 0.5 * radius. The tip is rendered with height = 2.0 * radius and radius = 1.0 * radius.

◆ with_labels()

Arrows2D rerun::archetypes::Arrows2D::with_labels ( Collection< rerun::components::Text _labels) &&
inline

Optional text labels for the arrows.

If there's a single label present, it will be placed at the center of the entity. Otherwise, each instance will have its own label.

◆ with_draw_order()

Arrows2D rerun::archetypes::Arrows2D::with_draw_order ( rerun::components::DrawOrder  _draw_order) &&
inline

An optional floating point value that specifies the 2D drawing order.

Objects with higher values are drawn on top of those with lower values.

◆ with_class_ids()

Arrows2D rerun::archetypes::Arrows2D::with_class_ids ( Collection< rerun::components::ClassId _class_ids) &&
inline

Optional class Ids for the points.

The components::ClassId provides colors and labels if not specified explicitly.

Member Data Documentation

◆ origins

std::optional<Collection<rerun::components::Position2D> > rerun::archetypes::Arrows2D::origins

All the origin (base) positions for each arrow in the batch.

If no origins are set, (0, 0) is used as the origin for each arrow.

◆ radii

std::optional<Collection<rerun::components::Radius> > rerun::archetypes::Arrows2D::radii

Optional radii for the arrows.

The shaft is rendered as a line with radius = 0.5 * radius. The tip is rendered with height = 2.0 * radius and radius = 1.0 * radius.

◆ labels

std::optional<Collection<rerun::components::Text> > rerun::archetypes::Arrows2D::labels

Optional text labels for the arrows.

If there's a single label present, it will be placed at the center of the entity. Otherwise, each instance will have its own label.

◆ draw_order

std::optional<rerun::components::DrawOrder> rerun::archetypes::Arrows2D::draw_order

An optional floating point value that specifies the 2D drawing order.

Objects with higher values are drawn on top of those with lower values.

◆ class_ids

std::optional<Collection<rerun::components::ClassId> > rerun::archetypes::Arrows2D::class_ids

Optional class Ids for the points.

The components::ClassId provides colors and labels if not specified explicitly.


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