Rerun C++ SDK
Loading...
Searching...
No Matches
rotation3d.hpp
1// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/re_types/definitions/rerun/components/rotation3d.fbs".
3
4#pragma once
5
6#include "../datatypes/rotation3d.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class DataType;
15 class DenseUnionBuilder;
16} // namespace arrow
17
18namespace rerun::components {
19 /// **Component**: A 3D rotation, represented either by a quaternion or a rotation around axis.
20 struct Rotation3D {
21 /// Representation of the rotation.
23
24 public:
25 // Extensions to generated type defined in 'rotation3d_ext.cpp'
26
27 static const Rotation3D IDENTITY;
28
29 /// Construct Rotation3d from Quaternion.
30 Rotation3D(datatypes::Quaternion quaternion) : repr{quaternion} {}
31
32 /// Construct Rotation3d from axis-angle
33 Rotation3D(datatypes::RotationAxisAngle axis_angle) : repr{axis_angle} {}
34
35 public:
36 Rotation3D() = default;
37
39
41 repr = repr_;
42 return *this;
43 }
44
45 /// Cast to the underlying Rotation3D datatype
47 return repr;
48 }
49 };
50} // namespace rerun::components
51
52namespace rerun {
53 template <typename T>
54 struct Loggable;
55
56 /// \private
57 template <>
58 struct Loggable<components::Rotation3D> {
59 static constexpr const char Name[] = "rerun.components.Rotation3D";
60
61 /// Returns the arrow data type this type corresponds to.
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
63
64 /// Fills an arrow array builder with an array of this type.
65 static rerun::Error fill_arrow_array_builder(
66 arrow::DenseUnionBuilder* builder, const components::Rotation3D* elements,
67 size_t num_elements
68 );
69
70 /// Serializes an array of `rerun::components::Rotation3D` into an arrow array.
71 static Result<std::shared_ptr<arrow::Array>> to_arrow(
72 const components::Rotation3D* instances, size_t num_instances
73 );
74 };
75} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:69
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Component: A 3D rotation, represented either by a quaternion or a rotation around axis.
Definition rotation3d.hpp:20
Rotation3D(datatypes::Quaternion quaternion)
Construct Rotation3d from Quaternion.
Definition rotation3d.hpp:30
rerun::datatypes::Rotation3D repr
Representation of the rotation.
Definition rotation3d.hpp:22
Rotation3D(datatypes::RotationAxisAngle axis_angle)
Construct Rotation3d from axis-angle.
Definition rotation3d.hpp:33
Datatype: A Quaternion represented by 4 real numbers.
Definition quaternion.hpp:23
Datatype: A 3D rotation.
Definition rotation3d.hpp:59
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21