MathLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
BasicHSV< 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 BasicHSV & operator= (const BasicHSV &other)
 
constexpr enum Color hueColor () const
 
constexpr bool isNormalized () const
 
Constructors
constexpr BasicHSV ()=default
 
constexpr BasicHSV (Math::BasicDegree< value_type > h, value_type s, value_type v)
 
constexpr BasicHSV (const BasicHSV &other)
 
Element Access
constexpr Math::BasicDegree< value_type > hue () const
 
constexpr value_type saturation () const
 
constexpr value_type value () const
 
constexpr void hue (Math::BasicDegree< value_type > input)
 
constexpr void saturation (value_type input)
 
constexpr void value (value_type input)
 
Invalid Value Check
constexpr bool isNaN () const
 
constexpr bool isInf () const
 

Static Public Member Functions

Constants
static constexpr BasicHSV< 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 _value {}
 

Friends

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

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

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

The definition of an HSV color

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

Definition at line 774 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 780 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 783 of file Types.hpp.

Constructor & Destructor Documentation

◆ BasicHSV() [1/3]

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

◆ BasicHSV() [2/3]

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

Definition at line 796 of file Types.hpp.

◆ BasicHSV() [3/3]

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

Definition at line 805 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 911 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 916 of file Types.hpp.

◆ hue() [1/2]

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

Definition at line 848 of file Types.hpp.

◆ hue() [2/2]

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

Definition at line 852 of file Types.hpp.

◆ hueColor()

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

Definition at line 872 of file Types.hpp.

◆ isInf()

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

Definition at line 903 of file Types.hpp.

◆ isNaN()

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

Definition at line 901 of file Types.hpp.

◆ isNormalized()

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

Definition at line 891 of file Types.hpp.

◆ max()

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

Definition at line 837 of file Types.hpp.

◆ min()

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

Definition at line 832 of file Types.hpp.

◆ operator=()

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

Definition at line 815 of file Types.hpp.

◆ saturation() [1/2]

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

Definition at line 849 of file Types.hpp.

◆ saturation() [2/2]

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

Definition at line 857 of file Types.hpp.

◆ value() [1/2]

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

Definition at line 850 of file Types.hpp.

◆ value() [2/2]

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

Definition at line 864 of file Types.hpp.

Member Data Documentation

◆ _hue

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

Definition at line 907 of file Types.hpp.

◆ _saturation

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

Definition at line 908 of file Types.hpp.

◆ _value

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

Definition at line 909 of file Types.hpp.


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