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

Archetype: 2D line strips with positions and optional colors, radii, labels, etc. More...

#include <rerun/archetypes/line_strips2d.hpp>

Public Types

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

Public Member Functions

 LineStrips2D (LineStrips2D &&other)=default
 
 LineStrips2D (Collection< rerun::components::LineStrip2D > _strips)
 
LineStrips2D with_radii (Collection< rerun::components::Radius > _radii) &&
 Optional radii for the line strips.
 
LineStrips2D with_colors (Collection< rerun::components::Color > _colors) &&
 Optional colors for the line strips.
 
LineStrips2D with_labels (Collection< rerun::components::Text > _labels) &&
 Optional text labels for the line strips.
 
LineStrips2D with_draw_order (rerun::components::DrawOrder _draw_order) &&
 An optional floating point value that specifies the 2D drawing order of each line strip.
 
LineStrips2D with_class_ids (Collection< rerun::components::ClassId > _class_ids) &&
 Optional ClassIds for the lines.
 
LineStrips2D with_instance_keys (Collection< rerun::components::InstanceKey > _instance_keys) &&
 Unique identifiers for each individual line strip in the batch.
 
size_t num_instances () const
 Returns the number of primary instances of this archetype.
 

Public Attributes

Collection< rerun::components::LineStrip2Dstrips
 All the actual 2D line strips that make up the batch.
 
std::optional< Collection< rerun::components::Radius > > radii
 Optional radii for the line strips.
 
std::optional< Collection< rerun::components::Color > > colors
 Optional colors for the line strips.
 
std::optional< Collection< rerun::components::Text > > labels
 Optional text labels for the line strips.
 
std::optional< rerun::components::DrawOrderdraw_order
 An optional floating point value that specifies the 2D drawing order of each line strip.
 
std::optional< Collection< rerun::components::ClassId > > class_ids
 Optional ClassIds for the lines.
 
std::optional< Collection< rerun::components::InstanceKey > > instance_keys
 Unique identifiers for each individual line strip in the batch.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

Detailed Description

Archetype: 2D line strips with positions and optional colors, radii, labels, etc.

Example

line_strip2d_batch:

image

#include <rerun.hpp>
#include <vector>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_line_strip2d");
rec.spawn().exit_on_failure();
rerun::Collection<rerun::Vec2D> strip1 = {{0.f, 0.f}, {2.f, 1.f}, {4.f, -1.f}, {6.f, 0.f}};
{{0.f, 3.f}, {1.f, 4.f}, {2.f, 2.f}, {3.f, 4.f}, {4.f, 2.f}, {5.f, 4.f}, {6.f, 3.f}};
rec.log(
"strips",
rerun::LineStrips2D({strip1, strip2})
.with_colors({0xFF0000FF, 0x00FF00FF})
.with_radii({0.025f, 0.005f})
.with_labels({"one strip here", "and one strip there"})
);
// Log an extra rect to set the view bounds
rec.log("bounds", rerun::Boxes2D::from_centers_and_sizes({{3.0f, 1.5f}}, {{8.0f, 9.0f}}));
}
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:47
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:57
Archetype: 2D line strips with positions and optional colors, radii, labels, etc.
Definition line_strips2d.hpp:56
LineStrips2D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the line strips.
Definition line_strips2d.hpp:111
LineStrips2D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the line strips.
Definition line_strips2d.hpp:97
LineStrips2D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the line strips.
Definition line_strips2d.hpp:104

Member Function Documentation

◆ with_draw_order()

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

An optional floating point value that specifies the 2D drawing order of each line strip.

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

◆ with_class_ids()

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

Optional ClassIds for the lines.

The class ID provides colors and labels if not specified explicitly.

Member Data Documentation

◆ draw_order

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

An optional floating point value that specifies the 2D drawing order of each line strip.

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

◆ class_ids

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

Optional ClassIds for the lines.

The class ID provides colors and labels if not specified explicitly.

◆ IndicatorComponentName

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

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