MathLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
BasicHSL< T > Class Template Reference

#include <color/Types.hpp>

Public Types

enum  Color {
  Red , Yellow , Green , Cyan ,
  Blue , Magenta
}
 
Types
using value_type = T
 The type of the underlying implementation for each color.
 

Public Member Functions

constexpr BasicHSL & operator= (const BasicHSL &other)
 
constexpr enum Color hueColor () const
 
constexpr bool isNormalized () const
 
Constructors
constexpr BasicHSL ()=default
 
constexpr BasicHSL (Math::BasicDegree< value_type > h, value_type s, value_type l)
 
constexpr BasicHSL (const BasicHSL &other)
 
Element Access
constexpr Math::BasicDegree< value_type > hue () const
 
constexpr value_type saturation () const
 
constexpr value_type lightness () const
 
constexpr void hue (Math::BasicDegree< value_type > input)
 
constexpr void saturation (value_type input)
 
constexpr void lightness (value_type input)
 
Invalid Value Check
constexpr bool isNaN () const
 
constexpr bool isInf () const
 

Static Public Member Functions

Constants
static constexpr BasicHSL< T > min ()
 
static constexpr BasicHSV< T > max ()
 

Protected Member Functions

constexpr bool _isInBounds (value_type component, value_type lower_bound=0.0, value_type upper_bound=1.0) const
 
constexpr bool _isInBoundsUpTo (value_type component, value_type lower_bound=0.0, value_type upper_bound=1.0) const
 

Protected Attributes

Math::BasicDegree< value_type > _hue {}
 
value_type _saturation {}
 
value_type _lightness {}
 

Friends

constexpr bool approximately_equal_to (const BasicHSL< T > &value_to_test, const BasicHSL< T > &value_it_should_be, T tolerance=T{0.0002})
 

Related Symbols

(Note that these are not member symbols.)

Global Operators
constexpr BasicHSL< T > operator+ (const BasicHSL< T > &left, const BasicHSL< T > &right)
 
constexpr BasicHSL< T > operator- (const BasicHSL< T > &left, const BasicHSL< T > &right)
 

Detailed Description

template<std::floating_point T>
class Color::BasicHSL< T >

The definition of an HSL color

This represents a color as Hue, Saturation, and Lightness.

Definition at line 983 of file Types.hpp.

Member Typedef Documentation

◆ value_type

template<std::floating_point T>
using value_type = T

The type of the underlying implementation for each color.

Definition at line 989 of file Types.hpp.

Member Enumeration Documentation

◆ Color

template<std::floating_point T>
enum Color
Enumerator
Red 
Yellow 
Green 
Cyan 
Blue 
Magenta 

Definition at line 992 of file Types.hpp.

Constructor & Destructor Documentation

◆ BasicHSL() [1/3]

template<std::floating_point T>
constexpr BasicHSL ( )
constexprdefault

◆ BasicHSL() [2/3]

template<std::floating_point T>
constexpr BasicHSL ( Math::BasicDegree< value_type >  h,
value_type  s,
value_type  l 
)
inlineconstexpr

Definition at line 1005 of file Types.hpp.

◆ BasicHSL() [3/3]

template<std::floating_point T>
constexpr BasicHSL ( const BasicHSL< T > &  other)
inlineconstexpr

Definition at line 1014 of file Types.hpp.

Member Function Documentation

◆ _isInBounds()

template<std::floating_point T>
constexpr bool _isInBounds ( value_type  component,
value_type  lower_bound = 0.0,
value_type  upper_bound = 1.0 
) const
inlineconstexprprotected

Definition at line 1120 of file Types.hpp.

◆ _isInBoundsUpTo()

template<std::floating_point T>
constexpr bool _isInBoundsUpTo ( value_type  component,
value_type  lower_bound = 0.0,
value_type  upper_bound = 1.0 
) const
inlineconstexprprotected

Definition at line 1125 of file Types.hpp.

◆ hue() [1/2]

template<std::floating_point T>
constexpr Math::BasicDegree< value_type > hue ( ) const
inlineconstexpr

Definition at line 1057 of file Types.hpp.

◆ hue() [2/2]

template<std::floating_point T>
constexpr void hue ( Math::BasicDegree< value_type >  input)
inlineconstexpr

Definition at line 1061 of file Types.hpp.

◆ hueColor()

template<std::floating_point T>
constexpr enum Color hueColor ( ) const
inlineconstexpr

Definition at line 1081 of file Types.hpp.

◆ isInf()

template<std::floating_point T>
constexpr bool isInf ( ) const
inlineconstexpr

Definition at line 1112 of file Types.hpp.

◆ isNaN()

template<std::floating_point T>
constexpr bool isNaN ( ) const
inlineconstexpr

Definition at line 1110 of file Types.hpp.

◆ isNormalized()

template<std::floating_point T>
constexpr bool isNormalized ( ) const
inlineconstexpr

Definition at line 1100 of file Types.hpp.

◆ lightness() [1/2]

template<std::floating_point T>
constexpr value_type lightness ( ) const
inlineconstexpr

Definition at line 1059 of file Types.hpp.

◆ lightness() [2/2]

template<std::floating_point T>
constexpr void lightness ( value_type  input)
inlineconstexpr

Definition at line 1073 of file Types.hpp.

◆ max()

template<std::floating_point T>
static constexpr BasicHSV< T > max ( )
inlinestaticconstexpr

Definition at line 1046 of file Types.hpp.

◆ min()

template<std::floating_point T>
static constexpr BasicHSL< T > min ( )
inlinestaticconstexpr

Definition at line 1041 of file Types.hpp.

◆ operator=()

template<std::floating_point T>
constexpr BasicHSL & operator= ( const BasicHSL< T > &  other)
inlineconstexpr

Definition at line 1024 of file Types.hpp.

◆ saturation() [1/2]

template<std::floating_point T>
constexpr value_type saturation ( ) const
inlineconstexpr

Definition at line 1058 of file Types.hpp.

◆ saturation() [2/2]

template<std::floating_point T>
constexpr void saturation ( value_type  input)
inlineconstexpr

Definition at line 1066 of file Types.hpp.

Member Data Documentation

◆ _hue

template<std::floating_point T>
Math::BasicDegree<value_type> _hue {}
protected

Definition at line 1116 of file Types.hpp.

◆ _lightness

template<std::floating_point T>
value_type _lightness {}
protected

Definition at line 1118 of file Types.hpp.

◆ _saturation

template<std::floating_point T>
value_type _saturation {}
protected

Definition at line 1117 of file Types.hpp.


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