Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor::HdrColourComponent Class Reference

#include <HdrColourComponent.hpp>

Public Member Functions

 HdrColourComponent ()=default
 
CU_API HdrColourComponent (ColourComponent const &rhs, float gamma=2.2f)
 Constructor from SRGB component.
 
 HdrColourComponent (float value)
 Specified constructor.
 
HdrColourComponentoperator= (float rhs)
 Assignment operator from float.
 
HdrColourComponentoperator= (double rhs)
 Assignment operator from double.
 
HdrColourComponentoperator= (long double rhs)
 Assignment operator from long double.
 
HdrColourComponentoperator= (int8_t rhs)
 Assignment operator from int8_t.
 
HdrColourComponentoperator= (uint8_t rhs)
 Assignment operator from uint8_t.
 
HdrColourComponentoperator= (int16_t rhs)
 Assignment operator from int16_t.
 
HdrColourComponentoperator= (uint16_t rhs)
 Assignment operator from uint16_t.
 
HdrColourComponentoperator= (int32_t rhs)
 Assignment operator from int32_t.
 
HdrColourComponentoperator= (uint32_t rhs)
 Assignment operator from uint32_t.
 
HdrColourComponentoperator= (int64_t rhs)
 Assignment operator from int64_t.
 
HdrColourComponentoperator= (uint64_t rhs)
 Assignment operator from uint64_t.
 
int8_t & convertTo (int8_t &v) const
 int8_t conversion operator
 
uint8_t & convertTo (uint8_t &v) const
 uint8_t conversion operator
 
int16_t & convertTo (int16_t &v) const
 int16_t conversion operator
 
uint16_t & convertTo (uint16_t &v) const
 uint16_t conversion operator
 
int32_t & convertTo (int32_t &v) const
 int32_t conversion operator
 
uint32_t & convertTo (uint32_t &v) const
 uint32_t conversion operator
 
int64_t & convertTo (int64_t &v) const
 int64_t conversion operator
 
uint64_t & convertTo (uint64_t &v) const
 uint64_t conversion operator
 
float & convertTo (float &v) const
 float conversion operator
 
double & convertTo (double &v) const
 float conversion operator
 
long double & convertTo (long double &v) const
 float conversion operator
 
HdrColourComponentoperator+= (HdrColourComponent const &rhs)
 addition assignment operator
 
HdrColourComponentoperator-= (HdrColourComponent const &rhs)
 Substraction assignment operator.
 
HdrColourComponentoperator*= (HdrColourComponent const &rhs)
 Multiplication assignment operator.
 
HdrColourComponentoperator/= (HdrColourComponent const &rhs)
 Division assignment operator.
 
template<typename T >
HdrColourComponentoperator+= (T const &rhs)
 addition assignment operator
 
template<typename T >
HdrColourComponentoperator-= (T const &rhs)
 Substraction assignment operator.
 
template<typename T >
HdrColourComponentoperator*= (T const &rhs)
 Multiplication assignment operator.
 
template<typename T >
HdrColourComponentoperator/= (T const &rhs)
 Division assignment operator.
 
 operator float () const
 Implicit cast operator.
 
float const & value () const
 Retrieves the component value.
 
float & value ()
 Retrieves the component value.
 

Constructor & Destructor Documentation

◆ HdrColourComponent() [1/3]

castor::HdrColourComponent::HdrColourComponent ( )
default

◆ HdrColourComponent() [2/3]

CU_API castor::HdrColourComponent::HdrColourComponent ( ColourComponent const & rhs,
float gamma = 2.2f )
explicit

Constructor from SRGB component.

Parameters
[in]rhsThe SRGB component value.
[in]gammaThe gamma correction value.

◆ HdrColourComponent() [3/3]

castor::HdrColourComponent::HdrColourComponent ( float value)
inlineexplicit

Specified constructor.

Parameters
[in]valueThe component value

Member Function Documentation

◆ convertTo() [1/11]

double & castor::HdrColourComponent::convertTo ( double & v) const
inline

float conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [2/11]

float & castor::HdrColourComponent::convertTo ( float & v) const
inline

float conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [3/11]

int16_t & castor::HdrColourComponent::convertTo ( int16_t & v) const
inline

int16_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [4/11]

int32_t & castor::HdrColourComponent::convertTo ( int32_t & v) const
inline

int32_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [5/11]

int64_t & castor::HdrColourComponent::convertTo ( int64_t & v) const
inline

int64_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [6/11]

int8_t & castor::HdrColourComponent::convertTo ( int8_t & v) const
inline

int8_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [7/11]

long double & castor::HdrColourComponent::convertTo ( long double & v) const
inline

float conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [8/11]

uint16_t & castor::HdrColourComponent::convertTo ( uint16_t & v) const
inline

uint16_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [9/11]

uint32_t & castor::HdrColourComponent::convertTo ( uint32_t & v) const
inline

uint32_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [10/11]

uint64_t & castor::HdrColourComponent::convertTo ( uint64_t & v) const
inline

uint64_t conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [11/11]

uint8_t & castor::HdrColourComponent::convertTo ( uint8_t & v) const
inline

uint8_t conversion operator

References value().

Here is the call graph for this function:

◆ operator float()

castor::HdrColourComponent::operator float ( ) const
inline

Implicit cast operator.

Returns
The value

◆ operator*=() [1/2]

HdrColourComponent & castor::HdrColourComponent::operator*= ( HdrColourComponent const & rhs)
inline

Multiplication assignment operator.

Remarks
Clamps the result
Parameters
[in]rhsThe value to multiply
Returns
Result of this * rhs

◆ operator*=() [2/2]

template<typename T >
HdrColourComponent & castor::HdrColourComponent::operator*= ( T const & rhs)
inline

Multiplication assignment operator.

Parameters
[in]rhsThe value to multiply
Returns
Result of this * rhs

◆ operator+=() [1/2]

HdrColourComponent & castor::HdrColourComponent::operator+= ( HdrColourComponent const & rhs)
inline

addition assignment operator

Remarks
Clamps the result
Parameters
[in]rhsThe value to add
Returns
Result of this + rhs

◆ operator+=() [2/2]

template<typename T >
HdrColourComponent & castor::HdrColourComponent::operator+= ( T const & rhs)
inline

addition assignment operator

Parameters
[in]rhsThe value to add
Returns
Result of this + rhs

◆ operator-=() [1/2]

HdrColourComponent & castor::HdrColourComponent::operator-= ( HdrColourComponent const & rhs)
inline

Substraction assignment operator.

Remarks
Clamps the result
Parameters
[in]rhsThe value to subtract
Returns
Result of this - rhs

◆ operator-=() [2/2]

template<typename T >
HdrColourComponent & castor::HdrColourComponent::operator-= ( T const & rhs)
inline

Substraction assignment operator.

Parameters
[in]rhsThe value to subtract
Returns
Result of this - rhs

◆ operator/=() [1/2]

HdrColourComponent & castor::HdrColourComponent::operator/= ( HdrColourComponent const & rhs)
inline

Division assignment operator.

Remarks
Clamps the result
Parameters
[in]rhsThe value to divide
Returns
Result of this / rhs

◆ operator/=() [2/2]

template<typename T >
HdrColourComponent & castor::HdrColourComponent::operator/= ( T const & rhs)
inline

Division assignment operator.

Parameters
[in]rhsThe value to divide
Returns
Result of this / rhs

◆ operator=() [1/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( double rhs)
inline

Assignment operator from double.

Parameters
[in]rhsThe component value, must be between 0.0 and 1.0
Returns
Reference to this object

◆ operator=() [2/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( float rhs)
inline

Assignment operator from float.

Parameters
[in]rhsThe component value, must be between 0.0f and 1.0f
Returns
Reference to this object

◆ operator=() [3/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( int16_t rhs)
inline

Assignment operator from int16_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [4/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( int32_t rhs)
inline

Assignment operator from int32_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [5/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( int64_t rhs)
inline

Assignment operator from int64_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [6/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( int8_t rhs)
inline

Assignment operator from int8_t.

Parameters
[in]rhsThe component value
Returns
Reference to this object

◆ operator=() [7/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( long double rhs)
inline

Assignment operator from long double.

Parameters
[in]rhsThe component value, must be between 0.0 and 1.0
Returns
Reference to this object

◆ operator=() [8/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( uint16_t rhs)
inline

Assignment operator from uint16_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [9/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( uint32_t rhs)
inline

Assignment operator from uint32_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [10/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( uint64_t rhs)
inline

Assignment operator from uint64_t.

Parameters
[in]rhsThe component value, must be between 0 and 255
Returns
Reference to this object

◆ operator=() [11/11]

HdrColourComponent & castor::HdrColourComponent::operator= ( uint8_t rhs)
inline

Assignment operator from uint8_t.

Parameters
[in]rhsThe component value
Returns
Reference to this object

◆ value() [1/2]

float & castor::HdrColourComponent::value ( )
inline

Retrieves the component value.

Returns
The value

◆ value() [2/2]

float const & castor::HdrColourComponent::value ( ) const
inline

Retrieves the component value.

Returns
The value

Referenced by convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), and convertTo().

Here is the caller graph for this function:

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