Rgba32 Struct Reference

Standard 32-bit RGBA pixel with red, green, blue, and alpha channels, all with integer values in the range [0, 255]. More...

#include <Rgba.h>

List of all members.

Public Member Functions

 Rgba32 (unsigned char r_=0, unsigned char g_=0, unsigned char b_=0, unsigned char a_=255)
 operator Vector3 () const
 operator RgbaHDR () const
real_t luminance () const

Static Public Member Functions

static Rgba32 fromVector (const Vector3 &v)

Public Attributes

union {
   struct {
      unsigned char   b
      unsigned char   g
      unsigned char   r
      unsigned char   a
   } 
   unsigned char   data [4]
}; 


Detailed Description

Standard 32-bit RGBA pixel with red, green, blue, and alpha channels, all with integer values in the range [0, 255].

Definition at line 24 of file Rgba.h.


Constructor & Destructor Documentation

Rgba32::Rgba32 ( unsigned char  r_ = 0,
unsigned char  g_ = 0,
unsigned char  b_ = 0,
unsigned char  a_ = 255 
) [inline, explicit]

Definition at line 15 of file Rgba.inl.


Member Function Documentation

static Rgba32 Rgba32::fromVector ( const Vector3 v  )  [inline, static]

Definition at line 34 of file Rgba.h.

Rgba32::operator Vector3 (  )  const [inline]

Returns:
this Rgba as a Vector3 (implicit conversion) for convenience purposes

Definition at line 20 of file Rgba.inl.

Rgba32::operator RgbaHDR (  )  const [inline]

Returns:
this Rgba32 as a RgbaHDR

Definition at line 26 of file Rgba.inl.

real_t Rgba32::luminance (  )  const [inline]

Returns:
the luminance of this Rgba

Definition at line 30 of file Rgba.inl.


Member Data Documentation

unsigned char Rgba32::b

Definition at line 26 of file Rgba.h.

unsigned char Rgba32::g

Definition at line 26 of file Rgba.h.

unsigned char Rgba32::r

Definition at line 26 of file Rgba.h.

unsigned char Rgba32::a

Definition at line 26 of file Rgba.h.

unsigned char Rgba32::data[4]

Definition at line 28 of file Rgba.h.

union { ... }


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6