Rerun C++ SDK
Loading...
Searching...
No Matches
geo_line_strings.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/archetypes/geo_line_strings.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/color.hpp"
10#include "../components/geo_line_string.hpp"
11#include "../components/radius.hpp"
12#include "../indicator_component.hpp"
13#include "../result.hpp"
14
15#include <cstdint>
16#include <optional>
17#include <utility>
18#include <vector>
19
20namespace rerun::archetypes {
21 /// **Archetype**: Geospatial line strings with positions expressed in [EPSG:4326](https://epsg.io/4326) altitude and longitude (North/East-positive degrees), and optional colors and radii.
22 ///
23 /// Also known as "line strips" or "polylines".
24 ///
25 /// ## Example
26 ///
27 /// ### Log a geospatial line string
28 /// ![image](https://static.rerun.io/geo_line_strings_simple/5669983eb10906ace303755b5b5039cad75b917f/full.png)
29 ///
30 /// ```cpp
31 /// #include <rerun.hpp>
32 ///
33 /// int main() {
34 /// const auto rec = rerun::RecordingStream("rerun_example_geo_line_strings");
35 /// rec.spawn().exit_on_failure();
36 ///
37 /// auto line_string = rerun::components::GeoLineString::from_lat_lon(
38 /// {{41.0000, -109.0452},
39 /// {41.0000, -102.0415},
40 /// {36.9931, -102.0415},
41 /// {36.9931, -109.0452},
42 /// {41.0000, -109.0452}}
43 /// );
44 ///
45 /// rec.log(
46 /// "colorado",
47 /// rerun::GeoLineStrings(line_string)
48 /// .with_radii(rerun::Radius::ui_points(2.0f))
49 /// .with_colors(rerun::Color(0, 0, 255))
50 /// );
51 /// }
52 /// ```
54 /// The line strings, expressed in [EPSG:4326](https://epsg.io/4326) coordinates (North/East-positive degrees).
56
57 /// Optional radii for the line strings.
58 ///
59 /// *Note*: scene units radiii are interpreted as meters. Currently, the display scale only considers the latitude of
60 /// the first vertex of each line string (see [this issue](https://github.com/rerun-io/rerun/issues/8013)).
61 std::optional<Collection<rerun::components::Radius>> radii;
62
63 /// Optional colors for the line strings.
64 std::optional<Collection<rerun::components::Color>> colors;
65
66 public:
67 static constexpr const char IndicatorComponentName[] =
68 "rerun.components.GeoLineStringsIndicator";
69
70 /// Indicator component, used to identify the archetype when converting to a list of components.
72
73 public:
74 GeoLineStrings() = default;
75 GeoLineStrings(GeoLineStrings&& other) = default;
76
78 : line_strings(std::move(_line_strings)) {}
79
80 /// Optional radii for the line strings.
81 ///
82 /// *Note*: scene units radiii are interpreted as meters. Currently, the display scale only considers the latitude of
83 /// the first vertex of each line string (see [this issue](https://github.com/rerun-io/rerun/issues/8013)).
85 radii = std::move(_radii);
86 // See: https://github.com/rerun-io/rerun/issues/4027
87 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
88 }
89
90 /// Optional colors for the line strings.
92 colors = std::move(_colors);
93 // See: https://github.com/rerun-io/rerun/issues/4027
94 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
95 }
96 };
97
98} // namespace rerun::archetypes
99
100namespace rerun {
101 /// \private
102 template <typename T>
103 struct AsComponents;
104
105 /// \private
106 template <>
107 struct AsComponents<archetypes::GeoLineStrings> {
108 /// Serialize all set component batches.
109 static Result<std::vector<ComponentBatch>> serialize(
110 const archetypes::GeoLineStrings& archetype
111 );
112 };
113} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Archetype: Geospatial line strings with positions expressed in EPSG:4326 altitude and longitude (Nort...
Definition geo_line_strings.hpp:53
Collection< rerun::components::GeoLineString > line_strings
The line strings, expressed in EPSG:4326 coordinates (North/East-positive degrees).
Definition geo_line_strings.hpp:55
GeoLineStrings with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the line strings.
Definition geo_line_strings.hpp:84
std::optional< Collection< rerun::components::Radius > > radii
Optional radii for the line strings.
Definition geo_line_strings.hpp:61
GeoLineStrings with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the line strings.
Definition geo_line_strings.hpp:91
std::optional< Collection< rerun::components::Color > > colors
Optional colors for the line strings.
Definition geo_line_strings.hpp:64
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32