5#include <cgv/media/color_scale.h>
6#include <cgv/media/transfer_function.h>
7#include <cgv/type/bool32_t.h>
28 using T = std::underlying_type_t<DeviceColorScaleMappingOptions>;
43 static constexpr size_t k_max_indexed_color_count = 255;
44 vec2 domain = { 0.0f, 1.0f };
45 rgba8 unknown_color = { 0, 0, 0, 255 };
46 float midpoint = 0.5f;
47 float exponent = 1.0f;
48 float log_base = 1.0f;
49 float log_midpoint = 0.5f;
50 float log_lower_bound = 0.0f;
51 float log_upper_bound = 1.0f;
52 float log_sign = 1.0f;
58 int32_t indexed_color_count = 0;
75 return get_color_scale()->get_modified_time();
87 std::vector<cgv::rgba> get_texture_data(
size_t texture_resolution)
const;
169#include <cgv/config/lib_end.h>
base class for all classes that can be registered with support for dynamic properties (see also secti...
device_color_scale_storage(std::shared_ptr< T > color_scale)
Construct using the given color scale pointer.
std::shared_ptr< cgv::media::continuous_color_scale > color_scale
device_color_scale_storage()
Construct using an default-constructed color scale of type T.
Base class defining an interface for using color scales on the graphics device, e....
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.
Implementation of a device_color_scale that wraps cgv::media::continuous_color_scale.
Implementation of a device_color_scale that wraps cgv::media::discrete_color_scale.
Implementation of a device_color_scale that wraps cgv::media::transfer_function.
namespace for api independent GPU programming
DeviceColorScaleSampleMode
Sample mode of the device color scale.
DeviceColorScaleMappingOptions
Flags that represent boolean mapping options of the color scales.
this header is dependency free
cgv::media::color< cgv::type::uint8_type, cgv::media::RGB, cgv::media::OPACITY > rgba8
declare rgba color type with 8 bit components
cgv::math::fvec< float, 2 > vec2
declare type of 2d single precision floating point vectors
Color scale arguments as used by the graphics device or shader program.
uint16_t transform
The next three fields "transform, mapping_options and sample_mode" take up 4 bytes in total.