![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Gradient.h>
Classes | |
| struct | Point |
Public Types | |
| enum class | Mode { kGradient , kLUT } |
Public Member Functions | |
| Gradient () | |
| Gradient (const std::vector< Gradient::Point > &points) | |
| virtual | ~Gradient () |
| const std::vector< Gradient::Point > & | GetPoints () const |
| void | SetPoints (const std::vector< Gradient::Point > &points) |
| Mode | GetMode () const |
| void | SetMode (Mode mode) |
| TextureHandle | GetTextureHandle (Renderer &renderer) |
Manages a gradient for the unlitGradient shader. In gradient mode, the array of points specifies points along the gradient, from 0 to 1 (inclusive). These do need to be evenly spaced. Simple greyscale: [ { 0.0, black }, { 1.0, white } ] Rainbow (note the gaps around green): [ { 0.000, blue }, { 0.125, cornflower blue }, { 0.250, cyan }, { 0.500, green }, { 0.750, yellow }, { 0.875, orange }, { 1.000, red } ] The gradient will generate a largish texture, so it should be fairly smooth, but the boundaries may not be exactly as specified due to quanitization imposed by the fixed size of the texture. The points must be sorted from the smallest value to the largest. The values must be in the range [0, 1].
Definition at line 41 of file Gradient.h.
| Enumerator | |
|---|---|
| kGradient | |
| kLUT | Normal gradient mode. Point.value will be ignored and the colors will be assumed to be evenly spaced. The texture will have only as many pixels as there are points. |
Definition at line 55 of file Gradient.h.
| cloudViewer::visualization::rendering::Gradient::Gradient | ( | ) |
Definition at line 35 of file Gradient.cpp.
| cloudViewer::visualization::rendering::Gradient::Gradient | ( | const std::vector< Gradient::Point > & | points | ) |
Definition at line 37 of file Gradient.cpp.
References points.
|
virtual |
Definition at line 41 of file Gradient.cpp.
| Gradient::Mode cloudViewer::visualization::rendering::Gradient::GetMode | ( | ) | const |
Definition at line 60 of file Gradient.cpp.
Referenced by cloudViewer::visualization::rendering::pybind_rendering_classes().
| const std::vector< Gradient::Point > & cloudViewer::visualization::rendering::Gradient::GetPoints | ( | ) | const |
Definition at line 43 of file Gradient.cpp.
Referenced by cloudViewer::visualization::rendering::pybind_rendering_classes().
| TextureHandle cloudViewer::visualization::rendering::Gradient::GetTextureHandle | ( | Renderer & | renderer | ) |
Definition at line 69 of file Gradient.cpp.
References cloudViewer::visualization::rendering::Renderer::AddTexture(), dist(), and kGradient.
| void cloudViewer::visualization::rendering::Gradient::SetMode | ( | Mode | mode | ) |
Definition at line 62 of file Gradient.cpp.
Referenced by cloudViewer::visualization::rendering::pybind_rendering_classes().
| void cloudViewer::visualization::rendering::Gradient::SetPoints | ( | const std::vector< Gradient::Point > & | points | ) |
Definition at line 47 of file Gradient.cpp.
References LogWarning, max(), min(), and points.
Referenced by cloudViewer::visualization::rendering::pybind_rendering_classes().