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

#include <ColourComponent.hpp>

Public Member Functions

 ColourComponent ()=default
 
CU_API ColourComponent (HdrColourComponent const &rhs, float gamma=2.2f)
 Constructor from HDR component.
 
 ColourComponent (float value)
 Specified constructor.
 
ColourComponentoperator= (float rhs)
 Assignment operator from float.
 
ColourComponentoperator= (double rhs)
 Assignment operator from double.
 
ColourComponentoperator= (long double rhs)
 Assignment operator from long double.
 
ColourComponentoperator= (int8_t rhs)
 Assignment operator from int8_t.
 
ColourComponentoperator= (uint8_t rhs)
 Assignment operator from uint8_t.
 
ColourComponentoperator= (int16_t rhs)
 Assignment operator from int16_t.
 
ColourComponentoperator= (uint16_t rhs)
 Assignment operator from uint16_t.
 
ColourComponentoperator= (int32_t rhs)
 Assignment operator from int32_t.
 
ColourComponentoperator= (uint32_t rhs)
 Assignment operator from uint32_t.
 
ColourComponentoperator= (int64_t rhs)
 Assignment operator from int64_t.
 
ColourComponentoperator= (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
 
ColourComponentoperator+= (ColourComponent const &rhs)
 Addition assignment operator.
 
ColourComponentoperator-= (ColourComponent const &rhs)
 Substraction assignment operator.
 
ColourComponentoperator*= (ColourComponent const &rhs)
 Multiplication assignment operator.
 
ColourComponentoperator/= (ColourComponent const &rhs)
 Division assignment operator.
 
template<typename T >
ColourComponentoperator+= (T const &rhs)
 Addition assignment operator.
 
template<typename T >
ColourComponentoperator-= (T const &rhs)
 Substraction assignment operator.
 
template<typename T >
ColourComponentoperator*= (T const &rhs)
 Multiplication assignment operator.
 
template<typename T >
ColourComponentoperator/= (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

◆ ColourComponent() [1/3]

castor::ColourComponent::ColourComponent ( )
default

◆ ColourComponent() [2/3]

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

Constructor from HDR component.

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

◆ ColourComponent() [3/3]

castor::ColourComponent::ColourComponent ( float value)
inlineexplicit

Specified constructor.

Parameters
[in]valueThe component value

Member Function Documentation

◆ convertTo() [1/11]

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

float conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [2/11]

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

float conversion operator

References value().

Here is the call graph for this function:

◆ convertTo() [3/11]

int16_t & castor::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::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::ColourComponent::convertTo ( uint8_t & v) const
inline

uint8_t conversion operator

References value().

Here is the call graph for this function:

◆ operator float()

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

Implicit cast operator.

Returns
The value

◆ operator*=() [1/2]

ColourComponent & castor::ColourComponent::operator*= ( ColourComponent 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 >
ColourComponent & castor::ColourComponent::operator*= ( T const & rhs)
inline

Multiplication assignment operator.

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

References value().

Here is the call graph for this function:

◆ operator+=() [1/2]

ColourComponent & castor::ColourComponent::operator+= ( ColourComponent 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 >
ColourComponent & castor::ColourComponent::operator+= ( T const & rhs)
inline

Addition assignment operator.

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

References value().

Here is the call graph for this function:

◆ operator-=() [1/2]

ColourComponent & castor::ColourComponent::operator-= ( ColourComponent 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 >
ColourComponent & castor::ColourComponent::operator-= ( T const & rhs)
inline

Substraction assignment operator.

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

References value().

Here is the call graph for this function:

◆ operator/=() [1/2]

ColourComponent & castor::ColourComponent::operator/= ( ColourComponent 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 >
ColourComponent & castor::ColourComponent::operator/= ( T const & rhs)
inline

Division assignment operator.

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

References value().

Here is the call graph for this function:

◆ operator=() [1/11]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

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

Assignment operator from int8_t.

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

◆ operator=() [7/11]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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]

ColourComponent & castor::ColourComponent::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::ColourComponent::value ( )
inline

Retrieves the component value.

Returns
The value

◆ value() [2/2]

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

Retrieves the component value.

Returns
The value

Referenced by convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), convertTo(), operator*=(), operator+=(), operator-=(), operator/=(), and castor3d::prepareChunkData().

Here is the caller graph for this function:

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