SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
RGBA Struct Reference

#include <Colors.h>

Collaboration diagram for RGBA:
Collaboration graph

Public Member Functions

 RGBA (uint8_t r_, uint8_t g_, uint8_t b_, uint8_t a_)
 
 RGBA ()
 
 RGBA (uint32_t v)
 
RGBAoperator= (uint32_t v)
 
RGBAoperator= (RGB v)
 
bool rgb_are_zero () const
 
uint8_t & operator[] (uint8_t idx)
 
glm::vec4 toFloats () const
 
glm::vec3 to3Floats () const
 
RGB toRGB () const
 

Public Attributes

union {
   uint8_t   v [4]
 
   uint32_t   val
 
   struct {
      uint8_t   r
 
      uint8_t   g
 
      uint8_t   b
 
      uint8_t   a
 
   } 
 
   struct {
      uint8_t   x
 
      uint8_t   y
 
      uint8_t   z
 
      uint8_t   w
 
   } 
 
}; 
 

Constructor & Destructor Documentation

RGBA::RGBA ( uint8_t  r_,
uint8_t  g_,
uint8_t  b_,
uint8_t  a_ 
)
inline
RGBA::RGBA ( )
inline
RGBA::RGBA ( uint32_t  v)
inline

Member Function Documentation

RGBA& RGBA::operator= ( uint32_t  v)
inline
RGBA& RGBA::operator= ( RGB  v)
inline
uint8_t& RGBA::operator[] ( uint8_t  idx)
inline
bool RGBA::rgb_are_zero ( ) const
inline
glm::vec3 RGBA::to3Floats ( ) const
inline
glm::vec4 RGBA::toFloats ( ) const
inline
RGB RGBA::toRGB ( ) const
inline

Member Data Documentation

union { ... }
uint8_t RGBA::a
uint8_t RGBA::b
uint8_t RGBA::g
uint8_t RGBA::r
uint8_t RGBA::v[4]
uint32_t RGBA::val
uint8_t RGBA::w
uint8_t RGBA::x
uint8_t RGBA::y
uint8_t RGBA::z

The documentation for this struct was generated from the following file: