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;
73 return get_color_scale()->get_modified_time();
85 std::vector<cgv::rgba> get_texture_data(
size_t texture_resolution)
const;
122 return color_scale.get();
167#include <cgv/config/lib_end.h>
base class for all classes that can be registered with support for dynamic properties (see also secti...
Base class template that provides a pointer to a concrete color scale implementation.
device_color_scale_storage(std::shared_ptr< T > color_scale)
Construct using the given color scale pointer.
std::shared_ptr< T > color_scale
The underlying host-side 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....
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.
DeviceColorScaleSampleMode
Sample mode of the device color scale.
DeviceColorScaleMappingOptions
Flags that represent boolean mapping options of the color scales.
this header is dependency free
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.