8-bit red, green, blue, alpha packed into 32 bit unsigned int
More...
#include <nanovdb/NanoVDB.h>
|
| Rgba8 (const Rgba8 &)=default |
| Default copy constructor.
|
|
| Rgba8 (Rgba8 &&)=default |
| Default move constructor.
|
|
Rgba8 & | operator= (Rgba8 &&)=default |
| Default move assignment operator.
|
|
Rgba8 & | operator= (const Rgba8 &)=default |
| Default copy assignment operator.
|
|
| Rgba8 () |
| Default ctor initializes all channels to zero.
|
|
| Rgba8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255u) |
| integer r,g,b,a ctor where alpha channel defaults to opaque
|
|
| Rgba8 (uint8_t v) |
| ctor where all channels are initialized to the same value
|
|
| Rgba8 (float r, float g, float b, float a=1.0f) |
| floating-point r,g,b,a ctor where alpha channel defaults to opaque
|
|
| Rgba8 (const Vec3f &rgb) |
| Vec3f r,g,b ctor (alpha channel it set to 1)
|
|
| Rgba8 (const Vec4f &rgba) |
| Vec4f r,g,b,a ctor.
|
|
bool | operator< (const Rgba8 &rhs) const |
|
bool | operator== (const Rgba8 &rhs) const |
|
float | lengthSqr () const |
|
float | length () const |
|
float | asFloat (int n) const |
| return n'th color channel as a float in the range 0 to 1
|
|
const uint8_t & | operator[] (int n) const |
|
uint8_t & | operator[] (int n) |
|
const uint32_t & | packed () const |
|
uint32_t & | packed () |
|
const uint8_t & | r () const |
|
const uint8_t & | g () const |
|
const uint8_t & | b () const |
|
const uint8_t & | a () const |
|
uint8_t & | r () |
|
uint8_t & | g () |
|
uint8_t & | b () |
|
uint8_t & | a () |
|
| operator Vec3f () const |
|
| operator Vec4f () const |
|
|
static const int | SIZE = 4 |
|
8-bit red, green, blue, alpha packed into 32 bit unsigned int
◆ ValueType
◆ Rgba8() [1/8]
Default copy constructor.
◆ Rgba8() [2/8]
Default move constructor.
◆ Rgba8() [3/8]
Default ctor initializes all channels to zero.
◆ Rgba8() [4/8]
Rgba8 |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b, |
|
|
uint8_t | a = 255u ) |
|
inline |
integer r,g,b,a ctor where alpha channel defaults to opaque
- Note
- all values should be in the range 0u to 255u
◆ Rgba8() [5/8]
ctor where all channels are initialized to the same value
- Note
- value should be in the range 0u to 255u
◆ Rgba8() [6/8]
Rgba8 |
( |
float | r, |
|
|
float | g, |
|
|
float | b, |
|
|
float | a = 1.0f ) |
|
inline |
floating-point r,g,b,a ctor where alpha channel defaults to opaque
- Note
- all values should be in the range 0.0f to 1.0f
◆ Rgba8() [7/8]
Vec3f r,g,b ctor (alpha channel it set to 1)
- Note
- all values should be in the range 0.0f to 1.0f
◆ Rgba8() [8/8]
Vec4f r,g,b,a ctor.
- Note
- all values should be in the range 0.0f to 1.0f
◆ a() [1/2]
◆ a() [2/2]
const uint8_t & a |
( |
| ) |
const |
|
inline |
◆ asFloat()
float asFloat |
( |
int | n | ) |
const |
|
inline |
return n'th color channel as a float in the range 0 to 1
◆ b() [1/2]
◆ b() [2/2]
const uint8_t & b |
( |
| ) |
const |
|
inline |
◆ g() [1/2]
◆ g() [2/2]
const uint8_t & g |
( |
| ) |
const |
|
inline |
◆ length()
◆ lengthSqr()
float lengthSqr |
( |
| ) |
const |
|
inline |
◆ operator Vec3f()
◆ operator Vec4f()
◆ operator<()
bool operator< |
( |
const Rgba8 & | rhs | ) |
const |
|
inline |
◆ operator=() [1/2]
Default copy assignment operator.
- Returns
- non-const reference to this instance
◆ operator=() [2/2]
Default move assignment operator.
- Returns
- non-const reference to this instance
◆ operator==()
bool operator== |
( |
const Rgba8 & | rhs | ) |
const |
|
inline |
◆ operator[]() [1/2]
uint8_t & operator[] |
( |
int | n | ) |
|
|
inline |
◆ operator[]() [2/2]
const uint8_t & operator[] |
( |
int | n | ) |
const |
|
inline |
◆ packed() [1/2]
◆ packed() [2/2]
const uint32_t & packed |
( |
| ) |
const |
|
inline |
◆ r() [1/2]
◆ r() [2/2]
const uint8_t & r |
( |
| ) |
const |
|
inline |
◆ packed
◆ SIZE