Rerun C++ SDK
Loading...
Searching...
No Matches
magnification_filter.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_sdk_types/definitions/rerun/components/magnification_filter.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class UInt8Type;
19 using UInt8Builder = NumericBuilder<UInt8Type>;
20} // namespace arrow
21
22namespace rerun::components {
23 /// **Component**: Filter used when a single texel/pixel of an image is displayed larger than a single screen pixel.
24 ///
25 /// This happens when zooming into an image, when displaying a low-resolution image in a large area,
26 /// or when viewing an image up close in 3D space.
27 enum class MagnificationFilter : uint8_t {
28
29 /// Show the nearest pixel value.
30 ///
31 /// This will give a blocky appearance when the image is scaled up.
32 /// Used as default when rendering 2D images.
33 Nearest = 1,
34
35 /// Linearly interpolate the nearest neighbors, creating a smoother look when the image is scaled up.
36 ///
37 /// Used as default for mesh rendering.
38 Linear = 2,
39
40 /// Bicubic interpolation using a Catmull-Rom spline, creating the smoothest look when the image is scaled up.
41 ///
42 /// This is computationally more expensive than linear filtering but produces sharper results with less blurring.
43 /// Unlike bilinear filtering, this avoids cross-shaped artifacts at texel boundaries.
44 Bicubic = 3,
45 };
46} // namespace rerun::components
47
48namespace rerun {
49 template <typename T>
50 struct Loggable;
51
52 /// \private
53 template <>
54 struct Loggable<components::MagnificationFilter> {
55 static constexpr std::string_view ComponentType = "rerun.components.MagnificationFilter";
56
57 /// Returns the arrow data type this type corresponds to.
58 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
59
60 /// Serializes an array of `rerun::components::MagnificationFilter` into an arrow array.
61 static Result<std::shared_ptr<arrow::Array>> to_arrow(
62 const components::MagnificationFilter* instances, size_t num_instances
63 );
64
65 /// Fills an arrow array builder with an array of this type.
66 static rerun::Error fill_arrow_array_builder(
67 arrow::UInt8Builder* builder, const components::MagnificationFilter* elements,
68 size_t num_elements
69 );
70 };
71} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
@ Linear
Connect data points with straight line segments.
MagnificationFilter
Component: Filter used when a single texel/pixel of an image is displayed larger than a single screen...
Definition magnification_filter.hpp:27
@ Nearest
Show the nearest pixel value.
@ Bicubic
Bicubic interpolation using a Catmull-Rom spline, creating the smoothest look when the image is scale...
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23