cgv
Loading...
Searching...
No Matches
cgv::render::gl_color_map Class Reference
Inheritance diagram for cgv::render::gl_color_map:
cgv::render::color_map

Public Member Functions

 gl_color_map (unsigned resolution)
 
 gl_color_map (const color_map &cm)
 
virtual bool has_texture_support () const
 
void clear ()
 
bool destruct (context &ctx)
 
bool is_linear_filtering_enabled () const
 
void enable_linear_filtering (bool enabled)
 
bool init (context &ctx)
 
void generate_texture (context &ctx)
 
textureref_texture ()
 
- Public Member Functions inherited from cgv::render::color_map
 color_map (const std::initializer_list< color_control_point_type > color_points)
 
 color_map (const std::initializer_list< color_type > colors)
 
 color_map (const std::initializer_list< opacity_control_point_type > opacity_points)
 
 color_map (const std::initializer_list< opacity_type > opacities)
 
 color_map (const std::initializer_list< std::pair< float, sample_point_type > > control_points)
 
void clear ()
 
void clear_color_points ()
 
void clear_opacity_points ()
 
bool empty () const
 
unsigned get_resolution () const
 
void set_resolution (unsigned resolution)
 
bool is_interpolation_enabled () const
 
void enable_interpolation (bool enabled)
 
void flip ()
 
void apply_gamma (float gamma)
 
void add_color_point (float t, rgb color)
 
void add_opacity_point (float t, float opacity)
 
const std::vector< color_control_point_type > & ref_color_points () const
 
const std::vector< opacity_control_point_type > & ref_opacity_points () const
 
rgb interpolate_color (float t) const
 
std::vector< rgbinterpolate_color (size_t n) const
 
float interpolate_opacity (float t) const
 
std::vector< float > interpolate_opacity (size_t n) const
 
rgba interpolate (float t) const
 
std::vector< rgbainterpolate (size_t n) const
 

Protected Member Functions

TextureFilter get_texture_filter ()
 
void setup_texture (bool use_opacity)
 
void generate_rgb_texture (context &ctx)
 
void generate_rgba_texture (context &ctx)
 
- Protected Member Functions inherited from cgv::render::color_map
void construct_interpolators ()
 

Protected Attributes

bool use_linear_filtering = true
 whether to use linear or nearest neighbour texture filtering
 
texture tex
 
- Protected Attributes inherited from cgv::render::color_map
cgv::math::control_point_container< rgbcolor_points
 
cgv::math::control_point_container< float > opacity_points
 
std::shared_ptr< cgv::math::interpolator< rgb > > color_interpolator_ptr = nullptr
 
std::shared_ptr< cgv::math::interpolator< float > > opacity_interpolator_ptr = nullptr
 
unsigned resolution = 256u
 resolution of the sampled color map; mostly used when generating textures from color maps
 
bool use_interpolation = true
 whether to use interpolation between the samples or just take the nearest one
 

Additional Inherited Members

- Protected Types inherited from cgv::render::color_map
typedef rgb color_type
 
typedef float opacity_type
 
typedef std::pair< opacity_type, color_typesample_point_type
 
typedef cgv::math::control_point_container< color_type >::control_point_type color_control_point_type
 
typedef cgv::math::control_point_container< opacity_type >::control_point_type opacity_control_point_type
 

Detailed Description

Definition at line 212 of file color_map.h.

Constructor & Destructor Documentation

◆ gl_color_map() [1/3]

cgv::render::gl_color_map::gl_color_map ( )
inline

Definition at line 290 of file color_map.h.

◆ gl_color_map() [2/3]

cgv::render::gl_color_map::gl_color_map ( unsigned  resolution)
inline

Definition at line 292 of file color_map.h.

◆ gl_color_map() [3/3]

cgv::render::gl_color_map::gl_color_map ( const color_map cm)
inline

Definition at line 296 of file color_map.h.

◆ ~gl_color_map()

virtual cgv::render::gl_color_map::~gl_color_map ( )
inlinevirtual

Definition at line 308 of file color_map.h.

Member Function Documentation

◆ clear()

void cgv::render::gl_color_map::clear ( )
inline

Definition at line 316 of file color_map.h.

◆ destruct()

bool cgv::render::gl_color_map::destruct ( context ctx)
inline

Definition at line 320 of file color_map.h.

◆ enable_linear_filtering()

void cgv::render::gl_color_map::enable_linear_filtering ( bool  enabled)
inline

Definition at line 328 of file color_map.h.

◆ generate_rgb_texture()

void cgv::render::gl_color_map::generate_rgb_texture ( context ctx)
inlineprotected

Definition at line 228 of file color_map.h.

◆ generate_rgba_texture()

void cgv::render::gl_color_map::generate_rgba_texture ( context ctx)
inlineprotected

Definition at line 258 of file color_map.h.

◆ generate_texture()

void cgv::render::gl_color_map::generate_texture ( context ctx)
inline

Definition at line 342 of file color_map.h.

◆ get_texture_filter()

TextureFilter cgv::render::gl_color_map::get_texture_filter ( )
inlineprotected

Definition at line 218 of file color_map.h.

◆ has_texture_support()

virtual bool cgv::render::gl_color_map::has_texture_support ( ) const
inlinevirtual

Reimplemented from cgv::render::color_map.

Definition at line 312 of file color_map.h.

◆ init()

bool cgv::render::gl_color_map::init ( context ctx)
inline

Definition at line 333 of file color_map.h.

◆ is_linear_filtering_enabled()

bool cgv::render::gl_color_map::is_linear_filtering_enabled ( ) const
inline

Definition at line 326 of file color_map.h.

◆ ref_texture()

texture & cgv::render::gl_color_map::ref_texture ( )
inline

Definition at line 350 of file color_map.h.

◆ setup_texture()

void cgv::render::gl_color_map::setup_texture ( bool  use_opacity)
inlineprotected

Definition at line 222 of file color_map.h.

Member Data Documentation

◆ tex

texture cgv::render::gl_color_map::tex
protected

Definition at line 216 of file color_map.h.

◆ use_linear_filtering

bool cgv::render::gl_color_map::use_linear_filtering = true
protected

whether to use linear or nearest neighbour texture filtering

Definition at line 215 of file color_map.h.


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