Struct Palette
Defined in File Palette.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Types
public flamegpu::visualiser::Stock::Palettes::Dark2
(Struct Dark2)public flamegpu::visualiser::Stock::Palettes::Greys
(Struct Greys)public flamegpu::visualiser::Stock::Palettes::Pastel
(Struct Pastel)public flamegpu::visualiser::Stock::Palettes::PiYG
(Struct PiYG)public flamegpu::visualiser::Stock::Palettes::RdYlBu
(Struct RdYlBu)public flamegpu::visualiser::Stock::Palettes::Set1
(Struct Set1)public flamegpu::visualiser::Stock::Palettes::Set2
(Struct Set2)public flamegpu::visualiser::Stock::Palettes::Viridis
(Struct Viridis)public flamegpu::visualiser::Stock::Palettes::YlGn
(Struct YlGn)public flamegpu::visualiser::Stock::Palettes::YlOrRd
(Struct YlOrRd)
Struct Documentation
-
struct Palette
Abstract class for representing collections of const colors Optionally, an enum can be added to sub-classes to allow them to be accessed via a name
Subclassed by flamegpu::visualiser::Stock::Palettes::Dark2, flamegpu::visualiser::Stock::Palettes::Greys, flamegpu::visualiser::Stock::Palettes::Pastel, flamegpu::visualiser::Stock::Palettes::PiYG, flamegpu::visualiser::Stock::Palettes::RdYlBu, flamegpu::visualiser::Stock::Palettes::Set1, flamegpu::visualiser::Stock::Palettes::Set2, flamegpu::visualiser::Stock::Palettes::Viridis, flamegpu::visualiser::Stock::Palettes::YlGn, flamegpu::visualiser::Stock::Palettes::YlOrRd
Public Types
-
enum Category
The possibles types of palette Qualitative: Distinct/unrelated colours Sequential: Colors in a sequential order, usually best treated as ordering low to high Diverging: Colors that are ordered such towards a central midpoint
Values:
-
enumerator Qualitative
-
enumerator Sequential
-
enumerator Diverging
-
enumerator Qualitative
-
typedef size_t size_type
Public Functions
-
virtual ~Palette() = default
Default virtual destructor
-
inline const Color &operator[](size_t i) const
Access the members of the palette as an array
- Parameters:
i – Index of the desired element, i must be less than size()
-
inline size_t size() const
Returns the number of colors in the palette
-
inline const_iterator begin() const
Returns an iterator to the first item in the palette
-
inline const_iterator end() const
Returns an iterator to after the last item in the palette
-
inline bool operator==(const Palette &other) const
Compares two palettes for equality (whether they contain the same colors)
-
virtual bool getColorBlindFriendly() const = 0
Returns whether the palette is confirmed as suitable for colorblind viewers
Friends
- friend class AutoPalette
-
class const_iterator
Basic iterator that provides constant access to a palettes colors.
Public Functions
-
inline const_iterator(const Palette &_palette, difference_type _pos)
-
inline const_iterator &operator++()
-
inline const_iterator operator++(int)
-
inline bool operator==(const_iterator other) const
-
inline bool operator!=(const_iterator other) const
-
inline const Color &operator*() const
-
inline const_iterator(const Palette &_palette, difference_type _pos)
-
enum Category