Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::Color3uint8 Class Reference

Represents a Color3 as a packed integer. More...

#include <Color3uint8.h>

List of all members.

Public Member Functions

uint32 asUInt32 () const
 Color3uint8 (class BinaryInput &bi)
 Color3uint8 (const class Color3 &c)
 Color3uint8 (const uint8 _r, const uint8 _g, const uint8 _b)
 Color3uint8 ()
void deserialize (class BinaryInput &bi)
 operator const G3D::uint8 * () const
 operator G3D::uint8 * ()
bool operator!= (const Color3uint8 &other) const
bool operator== (const Color3uint8 &other) const
G3D::uint8operator[] (int i) const
void serialize (class BinaryOutput &bo) const

Static Public Member Functions

static Color3uint8 fromARGB (uint32 i)

Public Attributes

uint8 b
uint8 g
uint8 r


Detailed Description

Represents a Color3 as a packed integer.

Convenient for creating unsigned int vertex arrays. Used by G3D::GImage as the underlying format.

WARNING: Integer color formats are different than integer vertex formats. The color channels are automatically scaled by 255 (because OpenGL automatically scales integer colors back by this factor). So Color3(1,1,1) == Color3uint8(255,255,255) but Vector3(1,1,1) == Vector3int16(1,1,1).


Constructor & Destructor Documentation

G3D::Color3uint8::Color3uint8 (  )  [inline]

G3D::Color3uint8::Color3uint8 ( const uint8  _r,
const uint8  _g,
const uint8  _b 
) [inline]

G3D::Color3uint8::Color3uint8 ( const class Color3 c  ) 

G3D::Color3uint8::Color3uint8 ( class BinaryInput bi  ) 


Member Function Documentation

uint32 G3D::Color3uint8::asUInt32 (  )  const [inline]

Returns the color packed into a uint32 (the upper byte is 0xFF).

void G3D::Color3uint8::deserialize ( class BinaryInput bi  ) 

static Color3uint8 G3D::Color3uint8::fromARGB ( uint32  i  )  [inline, static]

G3D::Color3uint8::operator const G3D::uint8 * (  )  const [inline]

G3D::Color3uint8::operator G3D::uint8 * (  )  [inline]

bool G3D::Color3uint8::operator!= ( const Color3uint8 other  )  const [inline]

bool G3D::Color3uint8::operator== ( const Color3uint8 other  )  const [inline]

G3D::uint8 & G3D::Color3uint8::operator[] ( int  i  )  const [inline]

void G3D::Color3uint8::serialize ( class BinaryOutput bo  )  const


Member Data Documentation


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:45 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo