Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | List of all members
castor::RgbaColourT< ComponentType > Class Template Reference

RGBA colour representation. More...

#include <RgbaColour.hpp>

Public Member Functions

 RgbaColourT ()=default
 
 RgbaColourT (RgbaColourT const &rhs)=default
 
RgbaColourToperator= (RgbaColourT const &rhs)=default
 
 RgbaColourT (RgbaColourT &&rhs) noexcept=default
 
RgbaColourToperator= (RgbaColourT &&rhs) noexcept=default
 
 ~RgbaColourT () noexcept=default
 
template<typename ComponentU >
 RgbaColourT (RgbaColourT< ComponentU > const &rhs, float gamma=2.2f)
 Constructor from other component type.
 
 RgbaColourT (float r, float g, float b, float a)
 Specified Constructor.
 
ColourComponentArrayIt begin ()
 Retrieves an iterator to the first ColourComponent.
 
ColourComponentArrayConstIt begin () const
 Retrieves a constant iterator to the first ColourComponent.
 
ColourComponentArrayIt end ()
 Retrieves an iterator to beyond the last ColourComponent.
 
ColourComponentArrayConstIt end () const
 Retrieves a constant iterator to beyond the last ColourComponent.
 
float const * constPtr () const
 Retrieves a constant pointer to the colour values.
 
float * ptr ()
 Retrieves a pointer to the colour values.
 
ComponentType & operator[] (RgbaComponent component)
 Retrieves the asked component value.
 
ComponentType const & operator[] (RgbaComponent component) const
 Retrieves the asked component value.
 
ComponentType & operator[] (size_t component)
 Retrieves the asked component value.
 
ComponentType const & operator[] (size_t component) const
 Retrieves the asked component value.
 
ComponentType & get (RgbaComponent component)
 Retrieves the asked component value.
 
ComponentType const & get (RgbaComponent component) const
 Retrieves the asked component value.
 
ComponentType & red ()
 Retrieves the red component value.
 
ComponentType const & red () const
 Retrieves the red component value.
 
ComponentType & green ()
 Retrieves the green component value.
 
ComponentType const & green () const
 Retrieves the green component value.
 
ComponentType & blue ()
 Retrieves the blue component value.
 
ComponentType const & blue () const
 Retrieves the blue component value.
 
ComponentType & alpha ()
 Retrieves the alpha component value.
 
ComponentType const & alpha () const
 Retrieves the alpha component value.
 
RgbaColourToperator+= (RgbaColourT const &rhs)
 addition assignment operator
 
RgbaColourToperator-= (RgbaColourT const &rhs)
 Substraction assignment operator.
 
template<typename T >
RgbaColourToperator+= (T scalar)
 addition assignment operator
 
template<typename T >
RgbaColourToperator-= (T scalar)
 Substraction assignment operator.
 
template<typename T >
RgbaColourToperator*= (T scalar)
 Multiplication assignment operator.
 
template<typename T >
RgbaColourToperator/= (T scalar)
 Division assignment operator.
 
RgbaColourToperator+= (ComponentType const &component)
 addition assignment operator
 
RgbaColourToperator-= (ComponentType const &component)
 Substraction assignment operator.
 
RgbaColourToperator*= (ComponentType const &component)
 Multiplication assignment operator.
 
RgbaColourToperator/= (ComponentType const &component)
 Division assignment operator.
 

Static Public Member Functions

template<typename T1 , typename T2 , typename T3 , typename T4 >
static RgbaColourT fromComponents (T1 const &r, T2 const &g, T3 const &b, T4 const &a)
 Constructor from components.
 
static RgbaColourT fromPredefined (PredefinedRgbaColour predefined)
 Constructor from a predefined colour.
 
static RgbaColourT fromRGB (Point3ub const &colour)
 Constructor from a point representing RGB components.
 
static RgbaColourT fromBGR (Point3ub const &colour)
 Constructor from a point representing BGR components.
 
static RgbaColourT fromRGBA (Point4ub const &colour)
 Constructor from a point representing RGBA components.
 
static RgbaColourT fromBGRA (Point4ub const &colour)
 Constructor from a point representing BGRA components.
 
static RgbaColourT fromARGB (Point4ub const &colour)
 Constructor from a point representing ARGB components.
 
static RgbaColourT fromABGR (Point4ub const &colour)
 Constructor from a point representing ABGR components.
 
static RgbaColourT fromRGB (Point3f const &colour)
 Constructor from a point representing RGB components.
 
static RgbaColourT fromBGR (Point3f const &colour)
 Constructor from a point representing BGR components.
 
static RgbaColourT fromRGBA (Point4f const &colour)
 Constructor from a point representing RGBA components.
 
static RgbaColourT fromARGB (Point4f const &colour)
 Constructor from a point representing ARGB components.
 
static RgbaColourT fromABGR (Point4f const &colour)
 Constructor from a point representing ABGR components.
 
static RgbaColourT fromBGRA (Point4f const &colour)
 Constructor from a point representing BGRA components.
 
static RgbaColourT fromRGB (uint8_t const(&colour)[3])
 Constructor from a point representing RGB components.
 
static RgbaColourT fromBGR (uint8_t const(&colour)[3])
 Constructor from a point representing BGR components.
 
static RgbaColourT fromRGBA (uint8_t const(&colour)[4])
 Constructor from a point representing RGBA components.
 
static RgbaColourT fromBGRA (uint8_t const(&colour)[4])
 Constructor from a point representing BGRA components.
 
static RgbaColourT fromARGB (uint8_t const(&colour)[4])
 Constructor from a point representing ARGB components.
 
static RgbaColourT fromABGR (uint8_t const(&colour)[4])
 Constructor from a point representing ABGR components.
 
static RgbaColourT fromRGB (float const(&colour)[3])
 Constructor from a point representing RGB components.
 
static RgbaColourT fromBGR (float const(&colour)[3])
 Constructor from a point representing BGR components.
 
static RgbaColourT fromRGBA (float const(&colour)[4])
 Constructor from a point representing RGBA components.
 
static RgbaColourT fromARGB (float const(&colour)[4])
 Constructor from a point representing ARGB components.
 
static RgbaColourT fromABGR (float const(&colour)[4])
 Constructor from a point representing ABGR components.
 
static RgbaColourT fromBGRA (float const(&colour)[4])
 Constructor from a point representing BGRA components.
 
static RgbaColourT fromRGB (uint32_t colour)
 Constructor from an uint32_t representing RGB components.
 
static RgbaColourT fromBGR (uint32_t colour)
 Constructor from an uint32_t representing BGR components.
 
static RgbaColourT fromARGB (uint32_t colour)
 Constructor from an uint32_t representing ARGB components.
 
static RgbaColourT fromRGBA (uint32_t colour)
 Constructor from an uint32_t representing RGBA components.
 
static RgbaColourT fromABGR (uint32_t colour)
 Constructor from an uint32_t representing ABGR components.
 
static RgbaColourT fromBGRA (uint32_t colour)
 Constructor from an uint32_t representing BGRA components.
 
static RgbaColourT fromHSB (float hue, float saturation, float brightness)
 Constructor from an HSB components.
 

Detailed Description

template<typename ComponentType>
class castor::RgbaColourT< ComponentType >

RGBA colour representation.

Remarks
Predefines numerous colours
Allows conversion to different colour formats (RGB, ARGB, BGR, ...) and different data types (long, float, char, ...)

Constructor & Destructor Documentation

◆ RgbaColourT() [1/5]

template<typename ComponentType >
castor::RgbaColourT< ComponentType >::RgbaColourT ( )
default

◆ RgbaColourT() [2/5]

template<typename ComponentType >
castor::RgbaColourT< ComponentType >::RgbaColourT ( RgbaColourT< ComponentType > const & rhs)
default

◆ RgbaColourT() [3/5]

template<typename ComponentType >
castor::RgbaColourT< ComponentType >::RgbaColourT ( RgbaColourT< ComponentType > && rhs)
defaultnoexcept

◆ ~RgbaColourT()

template<typename ComponentType >
castor::RgbaColourT< ComponentType >::~RgbaColourT ( )
defaultnoexcept

◆ RgbaColourT() [4/5]

template<typename ComponentType >
template<typename ComponentU >
castor::RgbaColourT< ComponentType >::RgbaColourT ( RgbaColourT< ComponentU > const & rhs,
float gamma = 2.2f )
explicit

Constructor from other component type.

Parameters
[in]rhsThe colour value.
[in]gammaThe gamma correction value.

◆ RgbaColourT() [5/5]

template<typename ComponentType >
castor::RgbaColourT< ComponentType >::RgbaColourT ( float r,
float g,
float b,
float a )

Specified Constructor.

Member Function Documentation

◆ alpha() [1/2]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::alpha ( )
inline

Retrieves the alpha component value.

Returns
The component value

References castor::eAlpha, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ alpha() [2/2]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::alpha ( ) const
inline

Retrieves the alpha component value.

Returns
The component value

References castor::eAlpha, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ begin() [1/2]

template<typename ComponentType >
ColourComponentArrayIt castor::RgbaColourT< ComponentType >::begin ( )
inline

Retrieves an iterator to the first ColourComponent.

Returns
The iterator

◆ begin() [2/2]

template<typename ComponentType >
ColourComponentArrayConstIt castor::RgbaColourT< ComponentType >::begin ( ) const
inline

Retrieves a constant iterator to the first ColourComponent.

Returns
The iterator

◆ blue() [1/2]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::blue ( )
inline

Retrieves the blue component value.

Returns
The component value

References castor::eBlue, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ blue() [2/2]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::blue ( ) const
inline

Retrieves the blue component value.

Returns
The component value

References castor::eBlue, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ constPtr()

template<typename ComponentType >
float const * castor::RgbaColourT< ComponentType >::constPtr ( ) const
inline

Retrieves a constant pointer to the colour values.

Returns
The pointer

Referenced by castor3d::getBuffer().

Here is the caller graph for this function:

◆ end() [1/2]

template<typename ComponentType >
ColourComponentArrayIt castor::RgbaColourT< ComponentType >::end ( )
inline

Retrieves an iterator to beyond the last ColourComponent.

Returns
The iterator

◆ end() [2/2]

template<typename ComponentType >
ColourComponentArrayConstIt castor::RgbaColourT< ComponentType >::end ( ) const
inline

Retrieves a constant iterator to beyond the last ColourComponent.

Returns
The iterator

◆ fromABGR() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromABGR ( float const(&) colour[4])
static

Constructor from a point representing ABGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromABGR() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromABGR ( Point4f const & colour)
static

Constructor from a point representing ABGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromABGR() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromABGR ( Point4ub const & colour)
static

Constructor from a point representing ABGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromABGR() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromABGR ( uint32_t colour)
static

Constructor from an uint32_t representing ABGR components.

Parameters
[in]colourThe uint32_t containing the colour (0xAABBGGRR)
Returns
The built RgbaColourT

◆ fromABGR() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromABGR ( uint8_t const(&) colour[4])
static

Constructor from a point representing ABGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromARGB() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromARGB ( float const(&) colour[4])
static

Constructor from a point representing ARGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromARGB() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromARGB ( Point4f const & colour)
static

Constructor from a point representing ARGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromARGB() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromARGB ( Point4ub const & colour)
static

Constructor from a point representing ARGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromARGB() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromARGB ( uint32_t colour)
static

Constructor from an uint32_t representing ARGB components.

Parameters
[in]colourThe uint32_t containing the colour (0xAARRGGBB)
Returns
The built RgbaColourT

◆ fromARGB() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromARGB ( uint8_t const(&) colour[4])
static

Constructor from a point representing ARGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGR() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGR ( float const(&) colour[3])
static

Constructor from a point representing BGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGR() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGR ( Point3f const & colour)
static

Constructor from a point representing BGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGR() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGR ( Point3ub const & colour)
static

Constructor from a point representing BGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGR() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGR ( uint32_t colour)
static

Constructor from an uint32_t representing BGR components.

Parameters
[in]colourThe uint32_t containing the colour (0x00BBGGRR)
Returns
The built RgbaColourT

◆ fromBGR() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGR ( uint8_t const(&) colour[3])
static

Constructor from a point representing BGR components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGRA() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGRA ( float const(&) colour[4])
static

Constructor from a point representing BGRA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGRA() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGRA ( Point4f const & colour)
static

Constructor from a point representing BGRA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGRA() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGRA ( Point4ub const & colour)
static

Constructor from a point representing BGRA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromBGRA() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGRA ( uint32_t colour)
static

Constructor from an uint32_t representing BGRA components.

Parameters
[in]colourThe uint32_t containing the colour (0xBBGGRRAA)
Returns
The built RgbaColourT

◆ fromBGRA() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromBGRA ( uint8_t const(&) colour[4])
static

Constructor from a point representing BGRA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromComponents()

template<typename ComponentType >
template<typename T1 , typename T2 , typename T3 , typename T4 >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromComponents ( T1 const & r,
T2 const & g,
T3 const & b,
T4 const & a )
inlinestatic

Constructor from components.

Parameters
[in]r,g,b,aThe colour components
Returns
The built RgbaColourT

References castor::eAlpha, castor::eBlue, castor::eGreen, and castor::eRed.

◆ fromHSB()

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromHSB ( float hue,
float saturation,
float brightness )
static

Constructor from an HSB components.

Parameters
[in]hue,saturation,brightnessThe HSB components.
Returns
The built RgbaColourT.

◆ fromPredefined()

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromPredefined ( PredefinedRgbaColour predefined)
inlinestatic

Constructor from a predefined colour.

Parameters
[in]predefined
Returns
The built RgbaColourT

References castor::RgbaColourT< ComponentType >::fromRGBA().

Here is the call graph for this function:

◆ fromRGB() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGB ( float const(&) colour[3])
static

Constructor from a point representing RGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGB() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGB ( Point3f const & colour)
static

Constructor from a point representing RGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGB() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGB ( Point3ub const & colour)
static

Constructor from a point representing RGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGB() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGB ( uint32_t colour)
static

Constructor from an uint32_t representing RGB components.

Parameters
[in]colourThe uint32_t containing the colour (0x00RRGGBB)
Returns
The built RgbaColourT

◆ fromRGB() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGB ( uint8_t const(&) colour[3])
static

Constructor from a point representing RGB components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGBA() [1/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGBA ( float const(&) colour[4])
static

Constructor from a point representing RGBA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGBA() [2/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGBA ( Point4f const & colour)
static

Constructor from a point representing RGBA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ fromRGBA() [3/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGBA ( Point4ub const & colour)
static

Constructor from a point representing RGBA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

Referenced by castor::RgbaColourT< ComponentType >::fromPredefined().

Here is the caller graph for this function:

◆ fromRGBA() [4/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGBA ( uint32_t colour)
static

Constructor from an uint32_t representing RGBA components.

Parameters
[in]colourThe uint32_t containing the colour (0xRRGGBBAA)
Returns
The built RgbaColourT

◆ fromRGBA() [5/5]

template<typename ComponentType >
static RgbaColourT castor::RgbaColourT< ComponentType >::fromRGBA ( uint8_t const(&) colour[4])
static

Constructor from a point representing RGBA components.

Parameters
[in]colourThe point containing the colour components
Returns
The built RgbaColourT

◆ get() [1/2]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::get ( RgbaComponent component)
inline

◆ get() [2/2]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::get ( RgbaComponent component) const
inline

Retrieves the asked component value.

Parameters
[in]componentThe asked component
Returns
The component value

◆ green() [1/2]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::green ( )
inline

Retrieves the green component value.

Returns
The component value

References castor::eGreen, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ green() [2/2]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::green ( ) const
inline

Retrieves the green component value.

Returns
The component value

References castor::eGreen, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ operator*=() [1/2]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator*= ( ComponentType const & component)

Multiplication assignment operator.

Parameters
[in]componentThe value to multiply
Returns
Result of this * component

◆ operator*=() [2/2]

template<typename ComponentType >
template<typename T >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator*= ( T scalar)
inline

Multiplication assignment operator.

Parameters
[in]scalarThe value to multiply
Returns
Result of this * scalar

References castor::eCount.

◆ operator+=() [1/3]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator+= ( ComponentType const & component)

addition assignment operator

Parameters
[in]componentThe value to add
Returns
Result of this + component

◆ operator+=() [2/3]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator+= ( RgbaColourT< ComponentType > const & rhs)

addition assignment operator

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

◆ operator+=() [3/3]

template<typename ComponentType >
template<typename T >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator+= ( T scalar)
inline

addition assignment operator

Parameters
[in]scalarThe value to add
Returns
Result of this + scalar

References castor::eCount.

◆ operator-=() [1/3]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator-= ( ComponentType const & component)

Substraction assignment operator.

Parameters
[in]componentThe value to subtract
Returns
Result of this - component

◆ operator-=() [2/3]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator-= ( RgbaColourT< ComponentType > const & rhs)

Substraction assignment operator.

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

◆ operator-=() [3/3]

template<typename ComponentType >
template<typename T >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator-= ( T scalar)
inline

Substraction assignment operator.

Parameters
[in]scalarThe value to subtract
Returns
Result of this - scalar

References castor::eCount.

◆ operator/=() [1/2]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator/= ( ComponentType const & component)

Division assignment operator.

Parameters
[in]componentThe value to divide
Returns
Result of this / component

◆ operator/=() [2/2]

template<typename ComponentType >
template<typename T >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator/= ( T scalar)
inline

Division assignment operator.

Parameters
[in]scalarThe value to divide
Returns
Result of this / scalar

References castor::eCount.

◆ operator=() [1/2]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator= ( RgbaColourT< ComponentType > && rhs)
defaultnoexcept

◆ operator=() [2/2]

template<typename ComponentType >
RgbaColourT & castor::RgbaColourT< ComponentType >::operator= ( RgbaColourT< ComponentType > const & rhs)
default

◆ operator[]() [1/4]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::operator[] ( RgbaComponent component)
inline

Retrieves the asked component value.

Parameters
[in]componentThe asked component
Returns
The components value

◆ operator[]() [2/4]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::operator[] ( RgbaComponent component) const
inline

Retrieves the asked component value.

Parameters
[in]componentThe asked component
Returns
The components value

◆ operator[]() [3/4]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::operator[] ( size_t component)
inline

Retrieves the asked component value.

Parameters
[in]componentThe asked component
Returns
The components value

◆ operator[]() [4/4]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::operator[] ( size_t component) const
inline

Retrieves the asked component value.

Parameters
[in]componentThe asked component
Returns
The components value

◆ ptr()

template<typename ComponentType >
float * castor::RgbaColourT< ComponentType >::ptr ( )
inline

Retrieves a pointer to the colour values.

Returns
The pointer

Referenced by castor3d::getBuffer().

Here is the caller graph for this function:

◆ red() [1/2]

template<typename ComponentType >
ComponentType & castor::RgbaColourT< ComponentType >::red ( )
inline

Retrieves the red component value.

Returns
The component value

References castor::eRed, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

◆ red() [2/2]

template<typename ComponentType >
ComponentType const & castor::RgbaColourT< ComponentType >::red ( ) const
inline

Retrieves the red component value.

Returns
The component value

References castor::eRed, and castor::RgbaColourT< ComponentType >::get().

Here is the call graph for this function:

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