Rerun C++ SDK
Loading...
Searching...
No Matches
near_clip_plane.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/blueprint/archetypes/near_clip_plane.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/near_clip_plane.hpp"
7#include "../../collection.hpp"
8#include "../../component_batch.hpp"
9#include "../../component_column.hpp"
10#include "../../result.hpp"
11
12#include <cstdint>
13#include <optional>
14#include <utility>
15#include <vector>
16
17namespace rerun::blueprint::archetypes {
18 /// **Archetype**: Controls the distance to the near clip plane in 3D scene units.
19 ///
20 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
21 ///
23 /// Controls the distance to the near clip plane in 3D scene units.
24 ///
25 /// Content closer than this distance will not be visible.
26 std::optional<ComponentBatch> near_clip_plane;
27
28 public:
29 /// The name of the archetype as used in `ComponentDescriptor`s.
30 static constexpr const char ArchetypeName[] = "rerun.blueprint.archetypes.NearClipPlane";
31
32 /// `ComponentDescriptor` for the `near_clip_plane` field.
34 ArchetypeName, "NearClipPlane:near_clip_plane",
36 );
37
38 public:
39 NearClipPlane() = default;
40 NearClipPlane(NearClipPlane&& other) = default;
41 NearClipPlane(const NearClipPlane& other) = default;
42 NearClipPlane& operator=(const NearClipPlane& other) = default;
43 NearClipPlane& operator=(NearClipPlane&& other) = default;
44
46 : near_clip_plane(ComponentBatch::from_loggable(
47 std::move(_near_clip_plane), Descriptor_near_clip_plane
48 )
49 .value_or_throw()) {}
50
51 /// Update only some specific fields of a `NearClipPlane`.
53 return NearClipPlane();
54 }
55
56 /// Clear all the fields of a `NearClipPlane`.
58
59 /// Controls the distance to the near clip plane in 3D scene units.
60 ///
61 /// Content closer than this distance will not be visible.
64 ) && {
67 .value_or_throw();
68 return std::move(*this);
69 }
70
71 /// Partitions the component data into multiple sub-batches.
72 ///
73 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
74 /// instead, via `ComponentBatch::partitioned`.
75 ///
76 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
77 ///
78 /// The specified `lengths` must sum to the total length of the component batch.
80
81 /// Partitions the component data into unit-length sub-batches.
82 ///
83 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
84 /// where `n` is automatically guessed.
86 };
87
88} // namespace rerun::blueprint::archetypes
89
90namespace rerun {
91 /// \private
92 template <typename T>
93 struct AsComponents;
94
95 /// \private
96 template <>
97 struct AsComponents<blueprint::archetypes::NearClipPlane> {
98 /// Serialize all set component batches.
99 static Result<Collection<ComponentBatch>> as_batches(
101 );
102 };
103} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: Controls the distance to the near clip plane in 3D scene units.
Definition near_clip_plane.hpp:22
static constexpr auto Descriptor_near_clip_plane
ComponentDescriptor for the near_clip_plane field.
Definition near_clip_plane.hpp:33
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
std::optional< ComponentBatch > near_clip_plane
Controls the distance to the near clip plane in 3D scene units.
Definition near_clip_plane.hpp:26
static NearClipPlane update_fields()
Update only some specific fields of a NearClipPlane.
Definition near_clip_plane.hpp:52
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition near_clip_plane.hpp:30
NearClipPlane with_near_clip_plane(const rerun::blueprint::components::NearClipPlane &_near_clip_plane) &&
Controls the distance to the near clip plane in 3D scene units.
Definition near_clip_plane.hpp:62
static NearClipPlane clear_fields()
Clear all the fields of a NearClipPlane.
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Component: Distance to the near clip plane used for Spatial2DView.
Definition near_clip_plane.hpp:17