OpenVDB 10.0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
Rgba8 Class Reference

8-bit red, green, blue, alpha packed into 32 bit unsigned int More...

#include <nanovdb/NanoVDB.h>

Public Types

using ValueType = uint8_t
 

Public Member Functions

 Rgba8 (const Rgba8 &)=default
 
 Rgba8 (Rgba8 &&)=default
 
Rgba8operator= (Rgba8 &&)=default
 
Rgba8operator= (const Rgba8 &)=default
 
 Rgba8 ()
 
 Rgba8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255u)
 
 Rgba8 (uint8_t v)
 
 Rgba8 (float r, float g, float b, float a=1.0f)
 
bool operator< (const Rgba8 &rhs) const
 
bool operator== (const Rgba8 &rhs) const
 
float lengthSqr () const
 
float length () const
 
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 ()
 

Static Public Attributes

static const int SIZE = 4
 

Detailed Description

8-bit red, green, blue, alpha packed into 32 bit unsigned int

Member Typedef Documentation

◆ ValueType

using ValueType = uint8_t

Constructor & Destructor Documentation

◆ Rgba8() [1/6]

Rgba8 ( const Rgba8 )
default

◆ Rgba8() [2/6]

Rgba8 ( Rgba8 &&  )
default

◆ Rgba8() [3/6]

Rgba8 ( )
inline

◆ Rgba8() [4/6]

Rgba8 ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255u 
)
inline

◆ Rgba8() [5/6]

Rgba8 ( uint8_t  v)
inlineexplicit

◆ Rgba8() [6/6]

Rgba8 ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
inline

Member Function Documentation

◆ a() [1/2]

uint8_t & a ( )
inline

◆ a() [2/2]

const uint8_t & a ( ) const
inline

◆ b() [1/2]

uint8_t & b ( )
inline

◆ b() [2/2]

const uint8_t & b ( ) const
inline

◆ g() [1/2]

uint8_t & g ( )
inline

◆ g() [2/2]

const uint8_t & g ( ) const
inline

◆ length()

float length ( ) const
inline

◆ lengthSqr()

float lengthSqr ( ) const
inline

◆ operator<()

bool operator< ( const Rgba8 rhs) const
inline

◆ operator=() [1/2]

Rgba8 & operator= ( const Rgba8 )
default

◆ operator=() [2/2]

Rgba8 & operator= ( Rgba8 &&  )
default

◆ 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]

uint32_t & packed ( )
inline

◆ packed() [2/2]

const uint32_t & packed ( ) const
inline

◆ r() [1/2]

uint8_t & r ( )
inline

◆ r() [2/2]

const uint8_t & r ( ) const
inline

Member Data Documentation

◆ c

uint8_t c[4]

◆ packed

uint32_t packed

◆ SIZE

const int SIZE = 4
static