cgv
Loading...
Searching...
No Matches
cgv::render::device_color_scale Class Referenceabstract

Base class defining an interface for using color scales on the graphics device, e.g. in a shader. More...

#include <device_color_scale.h>

Inheritance diagram for cgv::render::device_color_scale:
cgv::render::device_color_scale_storage< cgv::media::continuous_color_scale > cgv::render::device_color_scale_storage< cgv::media::discrete_color_scale > cgv::render::device_color_scale_storage< cgv::media::transfer_function > cgv::render::device_color_scale_storage< T > cgv::render::device_continuous_color_scale cgv::render::device_discrete_color_scale cgv::render::device_transfer_function

Public Member Functions

device_color_scale_arguments get_arguments () const
 Get the color scale arguments of the underlying color scale implementation.
 
cgv::data::time_point get_modified_time () const
 Get the time point of the last modification of this object.
 
std::vector< cgv::rgbaget_texture_data (size_t texture_resolution) const
 Get the texture data of the underlying color scales's color ramp or indexed colors.
 

Detailed Description

Base class defining an interface for using color scales on the graphics device, e.g. in a shader.

Definition at line 62 of file device_color_scale.h.

Member Function Documentation

◆ get_arguments()

device_color_scale_arguments cgv::render::device_color_scale::get_arguments ( ) const

Get the color scale arguments of the underlying color scale implementation.

Returns
The arguments struct.

Definition at line 6 of file device_color_scale.cxx.

References cgv::media::color_scale::get_domain(), cgv::media::color_scale::get_unknown_color(), and cgv::media::color_scale::is_clamped().

◆ get_modified_time()

cgv::data::time_point cgv::render::device_color_scale::get_modified_time ( ) const
inline

Get the time point of the last modification of this object.

Returns
The time point.

Definition at line 72 of file device_color_scale.h.

◆ get_texture_data()

std::vector< cgv::rgba > cgv::render::device_color_scale::get_texture_data ( size_t  texture_resolution) const

Get the texture data of the underlying color scales's color ramp or indexed colors.

The size of the returned sequence may only exactly match requested_resolution if the underlying color scale is continuous. Discrete color scales may only return as much samples as governed by their indexed color count. If the underlying color scale does not provide opacity mapping, the opacity of the returned samples is expected to be 1.

Parameters
texture_resolutionThe requested resolution.
Returns
The sequence of color RGBA samples.

Definition at line 19 of file device_color_scale.cxx.


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