Rerun C++ SDK
Loading...
Searching...
No Matches
pose_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 that doesn't propagate in the transform hierarchy.
16
17 public:
18 PoseRotationAxisAngle() = default;
19
21 : rotation(rotation_) {}
22
24 rotation = rotation_;
25 return *this;
26 }
27
28 /// Cast to the underlying RotationAxisAngle datatype
30 return rotation;
31 }
32 };
33} // namespace rerun::components
34
35namespace rerun {
36 static_assert(
37 sizeof(rerun::datatypes::RotationAxisAngle) == sizeof(components::PoseRotationAxisAngle)
38 );
39
40 /// \private
41 template <>
42 struct Loggable<components::PoseRotationAxisAngle> {
43 static constexpr const char Name[] = "rerun.components.PoseRotationAxisAngle";
44
45 /// Returns the arrow data type this type corresponds to.
46 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
47 return Loggable<rerun::datatypes::RotationAxisAngle>::arrow_datatype();
48 }
49
50 /// Serializes an array of `rerun::components::PoseRotationAxisAngle` into an arrow array.
51 static Result<std::shared_ptr<arrow::Array>> to_arrow(
52 const components::PoseRotationAxisAngle* instances, size_t num_instances
53 ) {
54 if (num_instances == 0) {
55 return Loggable<rerun::datatypes::RotationAxisAngle>::to_arrow(nullptr, 0);
56 } else if (instances == nullptr) {
57 return rerun::Error(
58 ErrorCode::UnexpectedNullArgument,
59 "Passed array instances is null when num_elements> 0."
60 );
61 } else {
62 return Loggable<rerun::datatypes::RotationAxisAngle>::to_arrow(
63 &instances->rotation,
64 num_instances
65 );
66 }
67 }
68 };
69} // 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 that doesn't propagate in the tr...
Definition pose_rotation_axis_angle.hpp:14
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21