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/components/rotation_axis_angle.fbs".
3
4#pragma once
5
6#include "../datatypes/rotation_axis_angle.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace rerun::components {
13 /// **Component**: 3D rotation represented by a rotation around a given axis.
16
17 public:
18 RotationAxisAngle() = default;
19
20 RotationAxisAngle(rerun::datatypes::RotationAxisAngle rotation_) : rotation(rotation_) {}
21
23 rotation = rotation_;
24 return *this;
25 }
26
27 /// Cast to the underlying RotationAxisAngle datatype
29 return rotation;
30 }
31 };
32} // namespace rerun::components
33
34namespace rerun {
35 static_assert(
36 sizeof(rerun::datatypes::RotationAxisAngle) == sizeof(components::RotationAxisAngle)
37 );
38
39 /// \private
40 template <>
41 struct Loggable<components::RotationAxisAngle> {
42 static constexpr const char Name[] = "rerun.components.RotationAxisAngle";
43
44 /// Returns the arrow data type this type corresponds to.
45 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
46 return Loggable<rerun::datatypes::RotationAxisAngle>::arrow_datatype();
47 }
48
49 /// Serializes an array of `rerun::components::RotationAxisAngle` into an arrow array.
50 static Result<std::shared_ptr<arrow::Array>> to_arrow(
51 const components::RotationAxisAngle* instances, size_t num_instances
52 ) {
53 if (num_instances == 0) {
54 return Loggable<rerun::datatypes::RotationAxisAngle>::to_arrow(nullptr, 0);
55 } else if (instances == nullptr) {
56 return rerun::Error(
57 ErrorCode::UnexpectedNullArgument,
58 "Passed array instances is null when num_elements> 0."
59 );
60 } else {
61 return Loggable<rerun::datatypes::RotationAxisAngle>::to_arrow(
62 &instances->rotation,
63 num_instances
64 );
65 }
66 }
67 };
68} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Component: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:14
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21