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

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

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

 LineStrips3D (LineStrips3D &&other)=default
 
 LineStrips3D (Collection< rerun::components::LineStrip3D > _strips)
 
LineStrips3D with_radii (Collection< rerun::components::Radius > _radii) &&
 Optional radii for the line strips.
 
LineStrips3D with_colors (Collection< rerun::components::Color > _colors) &&
 Optional colors for the line strips.
 
LineStrips3D with_labels (Collection< rerun::components::Text > _labels) &&
 Optional text labels for the line strips.
 
LineStrips3D with_show_labels (rerun::components::ShowLabels _show_labels) &&
 Optional choice of whether the text labels should be shown by default.
 
LineStrips3D with_class_ids (Collection< rerun::components::ClassId > _class_ids) &&
 Optional components::ClassIds for the lines.
 

Public Attributes

Collection< rerun::components::LineStrip3Dstrips
 All the actual 3D 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::ShowLabelsshow_labels
 Optional choice of whether the text labels should be shown by default.
 
std::optional< Collection< rerun::components::ClassId > > class_ids
 Optional components::ClassIds for the lines.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

Detailed Description

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

Examples

Many strips

image

#include <rerun.hpp>
#include <vector>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_line_strip3d_batch");
rec.spawn().exit_on_failure();
{0.f, 0.f, 2.f},
{1.f, 0.f, 2.f},
{1.f, 1.f, 2.f},
{0.f, 1.f, 2.f},
};
{0.f, 0.f, 0.f},
{0.f, 0.f, 1.f},
{1.f, 0.f, 0.f},
{1.f, 0.f, 1.f},
{1.f, 1.f, 0.f},
{1.f, 1.f, 1.f},
{0.f, 1.f, 0.f},
{0.f, 1.f, 1.f},
};
rec.log(
"strips",
rerun::LineStrips3D({strip1, strip2})
.with_colors({0xFF0000FF, 0x00FF00FF})
.with_radii({0.025f, 0.005f})
.with_labels({"one strip here", "and one strip there"})
);
}
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
Archetype: 3D line strips with positions and optional colors, radii, labels, etc.
Definition line_strips3d.hpp:103
LineStrips3D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the line strips.
Definition line_strips3d.hpp:149
LineStrips3D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the line strips.
Definition line_strips3d.hpp:159
LineStrips3D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the line strips.
Definition line_strips3d.hpp:142

Lines with scene & UI radius each

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_line_strip3d_ui_radius");
rec.spawn().exit_on_failure();
// A blue line with a scene unit radii of 0.01.
rerun::LineStrip3D linestrip_blue(
{{0.f, 0.f, 0.f}, {0.f, 0.f, 1.f}, {1.f, 0.f, 0.f}, {1.f, 0.f, 1.f}}
);
rec.log(
"scene_unit_line",
rerun::LineStrips3D(linestrip_blue)
// By default, radii are interpreted as world-space units.
.with_radii(0.01f)
);
// A red line with a ui point radii of 5.
// UI points are independent of zooming in Views, but are sensitive to the application UI scaling.
// For 100 % ui scaling, UI points are equal to pixels.
rerun::LineStrip3D linestrip_red(
{{3.f, 0.f, 0.f}, {3.f, 0.f, 1.f}, {4.f, 0.f, 0.f}, {4.f, 0.f, 1.f}}
);
rec.log(
"ui_points_line",
rerun::LineStrips3D(linestrip_red)
// By default, radii are interpreted as world-space units.
);
}
Component: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition color.hpp:17
Component: A line strip in 3D space.
Definition line_strip3d.hpp:33
static Radius ui_points(float radius_in_ui_points)
Creates a new radius in ui points.
Definition radius.hpp:35

Member Function Documentation

◆ with_labels()

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

Optional text labels for the line strips.

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_class_ids()

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

Optional components::ClassIds for the lines.

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

Member Data Documentation

◆ labels

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

Optional text labels for the line strips.

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.

◆ class_ids

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

Optional components::ClassIds for the lines.

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

◆ IndicatorComponentName

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

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