Open3D (C++ API)  0.18.0+6e910d9
Gradient.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <Eigen/Core>
11 #include <map>
12 #include <vector>
13 
15 
16 namespace open3d {
17 namespace visualization {
18 namespace rendering {
19 
20 class Renderer;
21 
41 class Gradient {
42 public:
43  struct Point {
44  float value;
45  Eigen::Vector4f color;
46  };
47 
48  Gradient();
49  Gradient(const std::vector<Gradient::Point>& points);
50  virtual ~Gradient();
51 
52  const std::vector<Gradient::Point>& GetPoints() const;
53  void SetPoints(const std::vector<Gradient::Point>& points);
54 
55  enum class Mode {
56  kGradient,
57  kLUT
60  };
61 
62  Mode GetMode() const;
63  void SetMode(Mode mode);
64 
66 
67 private:
68  std::vector<Gradient::Point> points_;
69  Mode mode_ = Mode::kGradient;
70  std::map<Renderer*, TextureHandle> textures_;
71 };
72 
73 } // namespace rendering
74 } // namespace visualization
75 } // namespace open3d
const std::vector< Gradient::Point > & GetPoints() const
Definition: Gradient.cpp:42
Mode GetMode() const
Definition: Gradient.cpp:59
void SetMode(Mode mode)
Definition: Gradient.cpp:61
Gradient()
Definition: Gradient.cpp:34
TextureHandle GetTextureHandle(Renderer &renderer)
Definition: Gradient.cpp:68
virtual ~Gradient()
Definition: Gradient.cpp:40
void SetPoints(const std::vector< Gradient::Point > &points)
Definition: Gradient.cpp:46
int points
Definition: FilePCD.cpp:54
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle temperature_c k4a_image_t image_handle uint8_t image_handle image_handle image_handle image_handle image_handle timestamp_usec white_balance image_handle k4a_device_configuration_t config device_handle char size_t serial_number_size bool int32_t int32_t int32_t int32_t k4a_color_control_mode_t default_mode mode
Definition: K4aPlugin.cpp:678
Definition: PinholeCameraIntrinsic.cpp:16
Eigen::Vector4f color
Definition: Gradient.h:45