Rerun C++ SDK
Loading...
Searching...
No Matches
rotation_axis_angle.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/datatypes/rotation_axis_angle.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7#include "angle.hpp"
8#include "vec3d.hpp"
9
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class StructBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: 3D rotation represented by a rotation around a given axis.
22 /// Axis to rotate around.
23 ///
24 /// This is not required to be normalized.
25 /// However, if normalization of the rotation axis fails (typically due to a zero vector)
26 /// the rotation is treated as an invalid transform, unless the angle is zero in which case
27 /// it is treated as an identity.
29
30 /// How much to rotate around the axis.
32
33 public: // START of extensions from rotation_axis_angle_ext.cpp:
34 RotationAxisAngle(const Vec3D& _axis, const Angle& _angle) : axis(_axis), angle(_angle) {}
35
36 // END of extensions from rotation_axis_angle_ext.cpp, start of generated code:
37
38 public:
39 RotationAxisAngle() = default;
40 };
41} // namespace rerun::datatypes
42
43namespace rerun {
44 template <typename T>
45 struct Loggable;
46
47 /// \private
48 template <>
49 struct Loggable<datatypes::RotationAxisAngle> {
50 static constexpr std::string_view ComponentType = "rerun.datatypes.RotationAxisAngle";
51
52 /// Returns the arrow data type this type corresponds to.
53 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
54
55 /// Serializes an array of `rerun::datatypes::RotationAxisAngle` into an arrow array.
56 static Result<std::shared_ptr<arrow::Array>> to_arrow(
57 const datatypes::RotationAxisAngle* instances, size_t num_instances
58 );
59
60 /// Fills an arrow array builder with an array of this type.
61 static rerun::Error fill_arrow_array_builder(
62 arrow::StructBuilder* builder, const datatypes::RotationAxisAngle* elements,
63 size_t num_elements
64 );
65 };
66} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:82
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: Angle in radians.
Definition angle.hpp:24
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21
rerun::datatypes::Vec3D axis
Axis to rotate around.
Definition rotation_axis_angle.hpp:28
rerun::datatypes::Angle angle
How much to rotate around the axis.
Definition rotation_axis_angle.hpp:31
Datatype: A vector in 3D space.
Definition vec3d.hpp:20