Open3D (C++ API)  0.17.0
Data Structures | Public Types | Public Member Functions
open3d::visualization::rendering::Gradient Class Reference

#include <Gradient.h>

Data Structures

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)
 

Detailed Description

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].

Member Enumeration Documentation

◆ Mode

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.

Constructor & Destructor Documentation

◆ Gradient() [1/2]

open3d::visualization::rendering::Gradient::Gradient ( )

◆ Gradient() [2/2]

open3d::visualization::rendering::Gradient::Gradient ( const std::vector< Gradient::Point > &  points)

◆ ~Gradient()

open3d::visualization::rendering::Gradient::~Gradient ( )
virtual

Member Function Documentation

◆ GetMode()

Gradient::Mode open3d::visualization::rendering::Gradient::GetMode ( ) const

◆ GetPoints()

const std::vector< Gradient::Point > & open3d::visualization::rendering::Gradient::GetPoints ( ) const

◆ GetTextureHandle()

TextureHandle open3d::visualization::rendering::Gradient::GetTextureHandle ( Renderer renderer)

◆ SetMode()

void open3d::visualization::rendering::Gradient::SetMode ( Mode  mode)

◆ SetPoints()

void open3d::visualization::rendering::Gradient::SetPoints ( const std::vector< Gradient::Point > &  points)

The documentation for this class was generated from the following files: