Rerun C++ SDK
Loading...
Searching...
No Matches
view_coordinates.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/view_coordinates.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../components/view_coordinates.hpp"
9#include "../indicator_component.hpp"
10#include "../rerun_sdk_export.hpp"
11#include "../result.hpp"
12
13#include <cstdint>
14#include <utility>
15#include <vector>
16
17namespace rerun::archetypes {
18 /// **Archetype**: How we interpret the coordinate system of an entity/space.
19 ///
20 /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed?
21 ///
22 /// The three coordinates are always ordered as [x, y, z].
23 ///
24 /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points
25 /// down, and the Z axis points forward.
26 ///
27 /// Make sure that this archetype is logged at or above the origin entity path of your 3D views.
28 ///
29 /// ## Example
30 ///
31 /// ### View coordinates for adjusting the eye camera
32 /// ![image](https://static.rerun.io/viewcoordinates/0833f0dc8616a676b7b2c566f2a6f613363680c5/full.png)
33 ///
34 /// ```cpp
35 /// #include <rerun.hpp>
36 ///
37 /// int main() {
38 /// const auto rec = rerun::RecordingStream("rerun_example_view_coordinates");
39 /// rec.spawn().exit_on_failure();
40 ///
41 /// rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
42 /// rec.log(
43 /// "world/xyz",
44 /// rerun::Arrows3D::from_vectors({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}
45 /// ).with_colors({{255, 0, 0}, {0, 255, 0}, {0, 0, 255}})
46 /// );
47 /// }
48 /// ```
50 /// The directions of the [x, y, z] axes.
52
53 public:
54 static constexpr const char IndicatorComponentName[] =
55 "rerun.components.ViewCoordinatesIndicator";
56
57 /// Indicator component, used to identify the archetype when converting to a list of components.
59
60 public: // START of extensions from view_coordinates_ext.cpp:
61 /// Construct Vec3D from x/y/z values.
62 constexpr ViewCoordinates(uint8_t axis0, uint8_t axis1, uint8_t axis2)
63 : xyz(rerun::components::ViewCoordinates(axis0, axis1, axis2)) {}
64
65 // <BEGIN_GENERATED:declarations>
66 // This section is generated by running `scripts/generate_view_coordinate_defs.py --cpp`
67 /// X=Up, Y=Left, Z=Forward
68 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULF;
69
70 /// X=Up, Y=Forward, Z=Left
71 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UFL;
72
73 /// X=Left, Y=Up, Z=Forward
74 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUF;
75
76 /// X=Left, Y=Forward, Z=Up
77 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LFU;
78
79 /// X=Forward, Y=Up, Z=Left
80 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUL;
81
82 /// X=Forward, Y=Left, Z=Up
83 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FLU;
84
85 /// X=Up, Y=Left, Z=Back
86 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULB;
87
88 /// X=Up, Y=Back, Z=Left
89 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UBL;
90
91 /// X=Left, Y=Up, Z=Back
92 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUB;
93
94 /// X=Left, Y=Back, Z=Up
95 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LBU;
96
97 /// X=Back, Y=Up, Z=Left
98 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUL;
99
100 /// X=Back, Y=Left, Z=Up
101 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLU;
102
103 /// X=Up, Y=Right, Z=Forward
104 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URF;
105
106 /// X=Up, Y=Forward, Z=Right
107 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UFR;
108
109 /// X=Right, Y=Up, Z=Forward
110 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUF;
111
112 /// X=Right, Y=Forward, Z=Up
113 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RFU;
114
115 /// X=Forward, Y=Up, Z=Right
116 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUR;
117
118 /// X=Forward, Y=Right, Z=Up
119 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FRU;
120
121 /// X=Up, Y=Right, Z=Back
122 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URB;
123
124 /// X=Up, Y=Back, Z=Right
125 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UBR;
126
127 /// X=Right, Y=Up, Z=Back
128 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUB;
129
130 /// X=Right, Y=Back, Z=Up
131 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RBU;
132
133 /// X=Back, Y=Up, Z=Right
134 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUR;
135
136 /// X=Back, Y=Right, Z=Up
137 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRU;
138
139 /// X=Down, Y=Left, Z=Forward
140 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLF;
141
142 /// X=Down, Y=Forward, Z=Left
143 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DFL;
144
145 /// X=Left, Y=Down, Z=Forward
146 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDF;
147
148 /// X=Left, Y=Forward, Z=Down
149 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LFD;
150
151 /// X=Forward, Y=Down, Z=Left
152 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDL;
153
154 /// X=Forward, Y=Left, Z=Down
155 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FLD;
156
157 /// X=Down, Y=Left, Z=Back
158 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLB;
159
160 /// X=Down, Y=Back, Z=Left
161 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DBL;
162
163 /// X=Left, Y=Down, Z=Back
164 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDB;
165
166 /// X=Left, Y=Back, Z=Down
167 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LBD;
168
169 /// X=Back, Y=Down, Z=Left
170 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDL;
171
172 /// X=Back, Y=Left, Z=Down
173 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLD;
174
175 /// X=Down, Y=Right, Z=Forward
176 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRF;
177
178 /// X=Down, Y=Forward, Z=Right
179 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DFR;
180
181 /// X=Right, Y=Down, Z=Forward
182 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDF;
183
184 /// X=Right, Y=Forward, Z=Down
185 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RFD;
186
187 /// X=Forward, Y=Down, Z=Right
188 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDR;
189
190 /// X=Forward, Y=Right, Z=Down
191 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FRD;
192
193 /// X=Down, Y=Right, Z=Back
194 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRB;
195
196 /// X=Down, Y=Back, Z=Right
197 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DBR;
198
199 /// X=Right, Y=Down, Z=Back
200 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDB;
201
202 /// X=Right, Y=Back, Z=Down
203 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RBD;
204
205 /// X=Back, Y=Down, Z=Right
206 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDR;
207
208 /// X=Back, Y=Right, Z=Down
209 RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRD;
210
211 /// X=Up, Y=Right, Z=Forward
213
214 /// X=Down, Y=Right, Z=Back
216
217 /// X=Right, Y=Up, Z=Back
219
220 /// X=Right, Y=Down, Z=Forward
222
223 /// X=Right, Y=Forward, Z=Up
225
226 /// X=Right, Y=Back, Z=Down
228
229 /// X=Up, Y=Right, Z=Back
231
232 /// X=Down, Y=Right, Z=Forward
234
235 /// X=Right, Y=Up, Z=Forward
237
238 /// X=Right, Y=Down, Z=Back
240
241 /// X=Right, Y=Back, Z=Up
243
244 /// X=Right, Y=Forward, Z=Down
246
247 // <END_GENERATED:declarations>
248
249 // END of extensions from view_coordinates_ext.cpp, start of generated code:
250
251 public:
252 ViewCoordinates() = default;
253 ViewCoordinates(ViewCoordinates&& other) = default;
254
255 explicit ViewCoordinates(rerun::components::ViewCoordinates _xyz) : xyz(std::move(_xyz)) {}
256 };
257
258} // namespace rerun::archetypes
259
260namespace rerun {
261 /// \private
262 template <typename T>
263 struct AsComponents;
264
265 /// \private
266 template <>
267 struct AsComponents<archetypes::ViewCoordinates> {
268 /// Serialize all set component batches.
269 static Result<std::vector<ComponentBatch>> serialize(
270 const archetypes::ViewCoordinates& archetype
271 );
272 };
273} // namespace rerun
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:72
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: How we interpret the coordinate system of an entity/space.
Definition view_coordinates.hpp:49
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BDL
X=Back, Y=Down, Z=Left.
Definition view_coordinates.hpp:170
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_X_UP
X=Up, Y=Right, Z=Back.
Definition view_coordinates.hpp:230
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LUB
X=Left, Y=Up, Z=Back.
Definition view_coordinates.hpp:92
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates ULF
X=Up, Y=Left, Z=Forward.
Definition view_coordinates.hpp:68
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BUR
X=Back, Y=Up, Z=Right.
Definition view_coordinates.hpp:134
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BUL
X=Back, Y=Up, Z=Left.
Definition view_coordinates.hpp:98
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RDF
X=Right, Y=Down, Z=Forward.
Definition view_coordinates.hpp:182
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FDR
X=Forward, Y=Down, Z=Right.
Definition view_coordinates.hpp:188
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DFL
X=Down, Y=Forward, Z=Left.
Definition view_coordinates.hpp:143
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LDF
X=Left, Y=Down, Z=Forward.
Definition view_coordinates.hpp:146
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FDL
X=Forward, Y=Down, Z=Left.
Definition view_coordinates.hpp:152
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates URB
X=Up, Y=Right, Z=Back.
Definition view_coordinates.hpp:122
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates URF
X=Up, Y=Right, Z=Forward.
Definition view_coordinates.hpp:104
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Y_UP
X=Right, Y=Up, Z=Back.
Definition view_coordinates.hpp:218
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LUF
X=Left, Y=Up, Z=Forward.
Definition view_coordinates.hpp:74
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LDB
X=Left, Y=Down, Z=Back.
Definition view_coordinates.hpp:164
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UFR
X=Up, Y=Forward, Z=Right.
Definition view_coordinates.hpp:107
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BRU
X=Back, Y=Right, Z=Up.
Definition view_coordinates.hpp:137
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RDB
X=Right, Y=Down, Z=Back.
Definition view_coordinates.hpp:200
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BDR
X=Back, Y=Down, Z=Right.
Definition view_coordinates.hpp:206
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RUF
X=Right, Y=Up, Z=Forward.
Definition view_coordinates.hpp:110
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LFU
X=Left, Y=Forward, Z=Up.
Definition view_coordinates.hpp:77
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_UP
X=Right, Y=Back, Z=Up.
Definition view_coordinates.hpp:242
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_DOWN
X=Down, Y=Right, Z=Back.
Definition view_coordinates.hpp:215
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DLF
X=Down, Y=Left, Z=Forward.
Definition view_coordinates.hpp:140
rerun::components::ViewCoordinates xyz
The directions of the [x, y, z] axes.
Definition view_coordinates.hpp:51
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_DOWN
X=Right, Y=Forward, Z=Down.
Definition view_coordinates.hpp:245
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DRF
X=Down, Y=Right, Z=Forward.
Definition view_coordinates.hpp:176
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LBD
X=Left, Y=Back, Z=Down.
Definition view_coordinates.hpp:167
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FRD
X=Forward, Y=Right, Z=Down.
Definition view_coordinates.hpp:191
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_UP
X=Right, Y=Up, Z=Forward.
Definition view_coordinates.hpp:236
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LBU
X=Left, Y=Back, Z=Up.
Definition view_coordinates.hpp:95
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DLB
X=Down, Y=Left, Z=Back.
Definition view_coordinates.hpp:158
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LFD
X=Left, Y=Forward, Z=Down.
Definition view_coordinates.hpp:149
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DBR
X=Down, Y=Back, Z=Right.
Definition view_coordinates.hpp:197
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FLU
X=Forward, Y=Left, Z=Up.
Definition view_coordinates.hpp:83
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RFD
X=Right, Y=Forward, Z=Down.
Definition view_coordinates.hpp:185
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_UP
X=Up, Y=Right, Z=Forward.
Definition view_coordinates.hpp:212
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RBD
X=Right, Y=Back, Z=Down.
Definition view_coordinates.hpp:203
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RFU
X=Right, Y=Forward, Z=Up.
Definition view_coordinates.hpp:113
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UFL
X=Up, Y=Forward, Z=Left.
Definition view_coordinates.hpp:71
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Y_DOWN
X=Right, Y=Down, Z=Forward.
Definition view_coordinates.hpp:221
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DRB
X=Down, Y=Right, Z=Back.
Definition view_coordinates.hpp:194
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DFR
X=Down, Y=Forward, Z=Right.
Definition view_coordinates.hpp:179
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_DOWN
X=Right, Y=Down, Z=Back.
Definition view_coordinates.hpp:239
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UBR
X=Up, Y=Back, Z=Right.
Definition view_coordinates.hpp:125
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BRD
X=Back, Y=Right, Z=Down.
Definition view_coordinates.hpp:209
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FRU
X=Forward, Y=Right, Z=Up.
Definition view_coordinates.hpp:119
constexpr ViewCoordinates(uint8_t axis0, uint8_t axis1, uint8_t axis2)
Construct Vec3D from x/y/z values.
Definition view_coordinates.hpp:62
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates ULB
X=Up, Y=Left, Z=Back.
Definition view_coordinates.hpp:86
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FLD
X=Forward, Y=Left, Z=Down.
Definition view_coordinates.hpp:155
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_X_DOWN
X=Down, Y=Right, Z=Forward.
Definition view_coordinates.hpp:233
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_UP
X=Right, Y=Forward, Z=Up.
Definition view_coordinates.hpp:224
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_DOWN
X=Right, Y=Back, Z=Down.
Definition view_coordinates.hpp:227
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FUL
X=Forward, Y=Up, Z=Left.
Definition view_coordinates.hpp:80
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DBL
X=Down, Y=Back, Z=Left.
Definition view_coordinates.hpp:161
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UBL
X=Up, Y=Back, Z=Left.
Definition view_coordinates.hpp:89
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BLU
X=Back, Y=Left, Z=Up.
Definition view_coordinates.hpp:101
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FUR
X=Forward, Y=Up, Z=Right.
Definition view_coordinates.hpp:116
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RUB
X=Right, Y=Up, Z=Back.
Definition view_coordinates.hpp:128
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BLD
X=Back, Y=Left, Z=Down.
Definition view_coordinates.hpp:173
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RBU
X=Right, Y=Back, Z=Up.
Definition view_coordinates.hpp:131
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30
Component: How we interpret the coordinate system of an entity/space.
Definition view_coordinates.hpp:30