Rerun C++ SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
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 "../result.hpp"
7
8#include <array>
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class DataType;
15 class FixedSizeListBuilder;
16} // namespace arrow
17
18namespace rerun::datatypes {
19 /// **Datatype**: An infinite 3D plane represented by a unit normal vector and a distance.
20 ///
21 /// Any point P on the plane fulfills the equation `dot(xyz, P) - d = 0`,
22 /// where `xyz` is the plane's normal and `d` the distance of the plane from the origin.
23 /// This representation is also known as the Hesse normal form.
24 ///
25 /// Note: although the normal will be passed through to the
26 /// datastore as provided, when used in the Viewer, planes will always be normalized.
27 /// I.e. the plane with xyz = (2, 0, 0), d = 1 is equivalent to xyz = (1, 0, 0), d = 0.5
28 struct Plane3D {
29 std::array<float, 4> xyzd;
30
31 public:
32 Plane3D() = default;
33 };
34} // namespace rerun::datatypes
35
36namespace rerun {
37 template <typename T>
38 struct Loggable;
39
40 /// \private
41 template <>
42 struct Loggable<datatypes::Plane3D> {
43 static constexpr std::string_view ComponentType = "rerun.datatypes.Plane3D";
44
45 /// Returns the arrow data type this type corresponds to.
46 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
47
48 /// Serializes an array of `rerun::datatypes::Plane3D` into an arrow array.
50 const datatypes::Plane3D* instances, size_t num_instances
51 );
52
53 /// Fills an arrow array builder with an array of this type.
54 static rerun::Error fill_arrow_array_builder(
55 arrow::FixedSizeListBuilder* builder, const datatypes::Plane3D* elements,
56 size_t num_elements
57 );
58 };
59} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
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:82
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
A type of component that can be registered.
Definition component_type.hpp:19
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:28