OpenVDB  9.0.1
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

using ValueType = uint8_t

Constructor & Destructor Documentation

Rgba8 ( const Rgba8 )
default
Rgba8 ( Rgba8 &&  )
default
Rgba8 ( )
inline
Rgba8 ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255u 
)
inline
Rgba8 ( uint8_t  v)
inlineexplicit
Rgba8 ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
inline

Member Function Documentation

const uint8_t& a ( ) const
inline
uint8_t& a ( )
inline
const uint8_t& b ( ) const
inline
uint8_t& b ( )
inline
const uint8_t& g ( ) const
inline
uint8_t& g ( )
inline
float length ( ) const
inline
float lengthSqr ( ) const
inline
bool operator< ( const Rgba8 rhs) const
inline
Rgba8& operator= ( Rgba8 &&  )
default
Rgba8& operator= ( const Rgba8 )
default
bool operator== ( const Rgba8 rhs) const
inline
const uint8_t& operator[] ( int  n) const
inline
uint8_t& operator[] ( int  n)
inline
const uint32_t& packed ( ) const
inline
uint32_t& packed ( )
inline
const uint8_t& r ( ) const
inline
uint8_t& r ( )
inline

Member Data Documentation

uint8_t c[4]
uint32_t packed
const int SIZE = 4
static