![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Pixel.hpp>

Public Types | |
| using | iterator = uint8_t * |
| using | const_iterator = uint8_t const * |
Public Member Functions | |
| Pixel (bool init=false) | |
| Constructor. | |
| Pixel (uint8_t *components) | |
| Constructor. | |
| Pixel (Pixel const &pxl) | |
| Copy Constructor. | |
| Pixel (Pixel &&pxl) noexcept | |
| Move Constructor. | |
| template<PixelFormat FU> | |
| Pixel (Array< uint8_t, PixelDefinitionsT< FU >::Size > const &components) | |
| Constructor. | |
| template<PixelFormat FU> | |
| Pixel (Pixel< FU > const &pxl) | |
| Constructor. | |
| ~Pixel () noexcept | |
| Destructor. | |
| Pixel & | operator= (Pixel &&pxl) noexcept |
| Copy assignment operator. | |
| Pixel & | operator= (Pixel const &pxl) |
| Move assignment operator. | |
| template<PixelFormat FU> | |
| Pixel & | operator= (Pixel< FU > const &pxl) |
| Copy assignment operator. | |
| template<typename U > | |
| void | sum (U &result) const |
| Computes the sum of all components. | |
| template<PixelFormat FU> | |
| Pixel< FU > | mul (Pixel< FU > const &px) const |
| Multiplication function. | |
| void | clear () noexcept |
| deallocate components | |
| void | link (uint8_t *components) noexcept |
| Links the data pointer to the one given in parameter. | |
| void | unlink () noexcept |
| Unlinks the data pointer from the ones previously given. | |
| template<PixelFormat FU> | |
| void | set (Array< uint8_t, PixelDefinitionsT< FU >::Size > const &components) |
| Converts given data and copies it into this pixel's components. | |
| template<PixelFormat FU> | |
| void | set (uint8_t const *components) |
| Converts given data and copies it into this pixel's components. | |
| template<PixelFormat FU> | |
| void | set (Pixel< FU > const &px) |
| Converts given pixel and copies it into this pixel's components. | |
| component_ref | operator[] (uint8_t index) |
| Retrieves the data at given index. | |
| component_const_ref | operator[] (uint8_t index) const |
| Retrieves the data at given index. | |
| component_const_ptr | constPtr () const |
| Retrieves the pointer on constant datas. | |
| component_ptr | ptr () |
| Retrieves the pointer on datas. | |
| iterator | begin () |
| Retrieves an iterator to the first element. | |
| const_iterator | begin () const |
| Retrieves a constant iterator to the first element. | |
| iterator | end () |
| Retrieves an iterator to the last element. | |
| const_iterator | end () const |
| Retrieves a constant iterator to the last element. | |
Arithmetic member operators. | |
| template<PixelFormat FU> | |
| Pixel & | operator+= (Pixel< FU > const &px) |
| template<PixelFormat FU> | |
| Pixel & | operator-= (Pixel< FU > const &px) |
| template<PixelFormat FU> | |
| Pixel & | operator*= (Pixel< FU > const &px) |
| template<PixelFormat FU> | |
| Pixel & | operator/= (Pixel< FU > const &px) |
Static Public Member Functions | |
| static PixelFormat | getFormat () |
| Retrieves the pixel format. | |
| static uint32_t | getSize () |
| Retrieves the pixel size. | |
Protected Types | |
| using | component_ptr = uint8_t * |
| using | component_const_ptr = uint8_t const * |
| using | component_ref = uint8_t & |
| using | component_const_ref = uint8_t const & |
Pixel definition.
|
protected |
|
protected |
|
protected |
|
protected |
| using castor::Pixel< FT >::const_iterator = uint8_t const * |
Constant iterator on the pixel's data.
| using castor::Pixel< FT >::iterator = uint8_t * |
Iterator on the pixel's data.
|
explicit |
Constructor.
| [in] | init | Tells if the data are initialised |
|
explicit |
Constructor.
| [in] | components | Initialises the data to this one |
| castor::Pixel< FT >::Pixel | ( | Pixel< FT > const & | pxl | ) |
Copy Constructor.
| [in] | pxl | The Pixel object to copy |
|
noexcept |
Move Constructor.
| [in] | pxl | The Pixel object to move |
|
explicit |
Constructor.
| [in] | components | Initialises the data to this one |
|
explicit |
Constructor.
| [in] | pxl | The Pixel object to copy |
|
noexcept |
Destructor.
|
inline |
Retrieves an iterator to the first element.
|
inline |
Retrieves a constant iterator to the first element.
|
noexcept |
deallocate components
|
inline |
Retrieves the pointer on constant datas.
|
inline |
Retrieves an iterator to the last element.
|
inline |
Retrieves a constant iterator to the last element.
|
inlinestatic |
Retrieves the pixel format.
|
inlinestatic |
Retrieves the pixel size.
|
noexcept |
Links the data pointer to the one given in parameter.
| Pixel< FU > castor::Pixel< FT >::mul | ( | Pixel< FU > const & | px | ) | const |
Multiplication function.
| [in] | px | The pixel to multiply |
| Pixel & castor::Pixel< FT >::operator*= | ( | Pixel< FU > const & | px | ) |
| Pixel & castor::Pixel< FT >::operator+= | ( | Pixel< FU > const & | px | ) |
| Pixel & castor::Pixel< FT >::operator-= | ( | Pixel< FU > const & | px | ) |
| Pixel & castor::Pixel< FT >::operator/= | ( | Pixel< FU > const & | px | ) |
|
noexcept |
| Pixel & castor::Pixel< FT >::operator= | ( | Pixel< FT > const & | pxl | ) |
| Pixel & castor::Pixel< FT >::operator= | ( | Pixel< FU > const & | pxl | ) |
|
inline |
Retrieves the data at given index.
|
inline |
Retrieves the data at given index.
|
inline |
Retrieves the pointer on datas.
| void castor::Pixel< FT >::set | ( | Array< uint8_t, PixelDefinitionsT< FU >::Size > const & | components | ) |
Converts given data and copies it into this pixel's components.
| [in] | components | Data to convert |
| void castor::Pixel< FT >::set | ( | Pixel< FU > const & | px | ) |
Converts given pixel and copies it into this pixel's components.
| [in] | px | Pixel to convert |
| void castor::Pixel< FT >::set | ( | uint8_t const * | components | ) |
Converts given data and copies it into this pixel's components.
| [in] | components | Data to convert |
Computes the sum of all components.
| [out] | result | Receives the sum |
|
noexcept |
Unlinks the data pointer from the ones previously given.