Rerun C++ SDK
Loading...
Searching...
No Matches
plane3d.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/plane3d.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <array>
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class FixedSizeListBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: An infinite 3D plane represented by a unit normal vector and a distance.
21 ///
22 /// Any point P on the plane fulfills the equation `dot(xyz, P) - d = 0`,
23 /// where `xyz` is the plane's normal and `d` the distance of the plane from the origin.
24 /// This representation is also known as the Hesse normal form.
25 ///
26 /// Note: although the normal will be passed through to the
27 /// datastore as provided, when used in the Viewer, planes will always be normalized.
28 /// I.e. the plane with xyz = (2, 0, 0), d = 1 is equivalent to xyz = (1, 0, 0), d = 0.5
29 struct Plane3D {
30 std::array<float, 4> xyzd;
31
32 public:
33 Plane3D() = default;
34 };
35} // namespace rerun::datatypes
36
37namespace rerun {
38 template <typename T>
39 struct Loggable;
40
41 /// \private
42 template <>
43 struct Loggable<datatypes::Plane3D> {
44 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.Plane3D";
45
46 /// Returns the arrow data type this type corresponds to.
47 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
48
49 /// Serializes an array of `rerun::datatypes::Plane3D` into an arrow array.
51 const datatypes::Plane3D* instances, size_t num_instances
52 );
53
54 /// Fills an arrow array builder with an array of this type.
55 static rerun::Error fill_arrow_array_builder(
56 arrow::FixedSizeListBuilder* builder, const datatypes::Plane3D* elements,
57 size_t num_elements
58 );
59 };
60} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:13
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Datatype: An infinite 3D plane represented by a unit normal vector and a distance.
Definition plane3d.hpp:29