|
| | Rgba8 (const Rgba8 &) noexcept=default |
| | Default copy constructor.
|
| | Rgba8 (Rgba8 &&) noexcept=default |
| | Default move constructor.
|
| Rgba8 & | operator= (Rgba8 &&) noexcept=default |
| | Default move assignment operator.
|
| Rgba8 & | operator= (const Rgba8 &) noexcept=default |
| | Default copy assignment operator.
|
| __hostdev__ constexpr | Rgba8 () noexcept |
| | Default ctor initializes all channels to zero.
|
| __hostdev__ constexpr | Rgba8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255u) noexcept |
| | integer r,g,b,a ctor where alpha channel defaults to opaque
|
| __hostdev__ constexpr | Rgba8 (uint8_t v) noexcept |
| | Ctor where all channels are initialized to the same value.
|
| __hostdev__ constexpr | Rgba8 (float r, float g, float b, float a=1.0f) noexcept |
| | floating-point r,g,b,a ctor where alpha channel defaults to opaque
|
| __hostdev__ constexpr | Rgba8 (const Vec3< float > &rgb) noexcept |
| | Construct from a Vec3<float> with rgb components (alpha set to opaque).
|
| __hostdev__ constexpr | Rgba8 (const Vec4< float > &rgba) noexcept |
| | Construct from a Vec4<float> with rgba components.
|
| __hostdev__ bool | operator< (const Rgba8 &rhs) const noexcept |
| | Compare on the 32-bit packed integer representation (lexicographic by byte).
|
| __hostdev__ bool | operator== (const Rgba8 &rhs) const noexcept |
| | Equality on the 32-bit packed integer representation.
|
| __hostdev__ constexpr float | lengthSqr () const noexcept |
| | Return the squared L2 length of the rgb channels in the [0, 1] range (alpha is ignored). 0.0000153787005f is 1/255^2.
|
| __hostdev__ float | length () const noexcept |
| | L2 length of the rgb channels (alpha ignored). Not constexpr — calls sqrtf.
|
| __hostdev__ constexpr float | asFloat (int n) const noexcept |
| | Return the n'th color channel as a float in the range 0 to 1.
|
| __hostdev__ constexpr const uint8_t & | operator[] (int n) const noexcept |
| | Indexed channel access. Asserts 0 <= n < 4 in debug builds.
|
| __hostdev__ constexpr uint8_t & | operator[] (int n) noexcept |
| | Mutable variant of operator[].
|
| __hostdev__ const uint32_t & | packed () const noexcept |
| | Const access to the 32-bit packed integer representation.
|
| __hostdev__ uint32_t & | packed () noexcept |
| | Mutable access to the 32-bit packed integer representation.
|
| __hostdev__ constexpr const uint8_t & | r () const noexcept |
| | Named channel accessors (r, g, b, a). Both const and non-const variants.
|
| __hostdev__ constexpr const uint8_t & | g () const noexcept |
| __hostdev__ constexpr const uint8_t & | b () const noexcept |
| __hostdev__ constexpr const uint8_t & | a () const noexcept |
| __hostdev__ constexpr uint8_t & | r () noexcept |
| __hostdev__ constexpr uint8_t & | g () noexcept |
| __hostdev__ constexpr uint8_t & | b () noexcept |
| __hostdev__ constexpr uint8_t & | a () noexcept |
| __hostdev__ constexpr | operator Vec3< float > () const noexcept |
| | Implicit conversion to a Vec3<float> with channels in [0, 1] (alpha dropped).
|
| __hostdev__ constexpr | operator Vec4< float > () const noexcept |
| | Implicit conversion to a Vec4<float> with rgba channels in [0, 1].
|
8-bit red, green, blue, alpha packed into 32 bit unsigned int