Support Forum       Library Source       SourceForge Page       G3D Web Page     
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
G3D::Color4 Class Reference

Do not subclass– this implementation makes assumptions about the memory layout. More...

Public Member Functions

 Color4 (const Any &any)
 
 Color4 ()
 Initializes to all zero.
 
 Color4 (const Color3 &c3, float a=1.0)
 
 Color4 (const class Color4unorm8 &c)
 
 Color4 (class BinaryInput &bi)
 
 Color4 (const class Vector4 &v)
 
 Color4 (float r, float g, float b, float a=1.0)
 
 Color4 (float value[4])
 
 Color4 (const Color4 &other)
 Initialize from another color.
 
Color3 bgr () const
 
void deserialize (class BinaryInput &bi)
 
bool fuzzyEq (const Color4 &other) const
 
bool fuzzyNe (const Color4 &other) const
 
size_t hashCode () const
 
bool isFinite () const
 
bool isOne () const
 
bool isZero () const
 
Color4 lerp (const Color4 &other, float a) const
 
Color4 max (const Color4 &other) const
 
Color4 min (const Color4 &other) const
 
bool operator!= (const Color4 &rkVector) const
 
Color4 operator* (float fScalar) const
 
Color4 operator* (const Color4 &k) const
 
Color4operator*= (const Color4 &c)
 
Color4operator*= (float fScalar)
 
Color4 operator+ (const Color4 &rkVector) const
 
Color4operator+= (const Color4 &rkVector)
 
Color4 operator- (const Color4 &rkVector) const
 
Color4 operator- () const
 
Color4operator-= (const Color4 &rkVector)
 
Color4 operator/ (float fScalar) const
 
Color4operator/= (float fScalar)
 
Color4operator= (const Color4 &rkVector)
 
bool operator== (const Color4 &rkVector) const
 
float & operator[] (int i) const
 
Color3 rgb () const
 
void serialize (class BinaryOutput &bo) const
 
float sum () const
 r + g + b + a
 
Any toAny () const
 Converts the Color4 to an Any.
 
std::string toString () const
 

Static Public Member Functions

static const Color4clear ()
 
static Color4 fromARGB (uint32)
 Initialize from an HTML-style color (e.g.
 
static const Color4inf ()
 
static const Color4nan ()
 
static const Color4one ()
 
static const Color4zero ()
 

Public Attributes

float a
 
float b
 
float g
 
float r
 Channel values.
 

Friends

Color4 operator* (double fScalar, const Color4 &rkVector)
 

Detailed Description

Do not subclass– this implementation makes assumptions about the memory layout.

Constructor & Destructor Documentation

G3D::Color4::Color4 ( const Any any)
Parameters
anyMust be in one of the following forms:
G3D::Color4::Color4 ( )
inline

Initializes to all zero.

Referenced by max(), min(), operator*(), operator+(), and operator-().

G3D::Color4::Color4 ( const Color3 c3,
float  a = 1.0 
)
inline
G3D::Color4::Color4 ( const class Color4unorm8 &  c)
G3D::Color4::Color4 ( class BinaryInput bi)
G3D::Color4::Color4 ( const class Vector4 v)
G3D::Color4::Color4 ( float  r,
float  g,
float  b,
float  a = 1.0 
)
inline
G3D::Color4::Color4 ( float  value[4])
inline
G3D::Color4::Color4 ( const Color4 other)
inline

Initialize from another color.

Member Function Documentation

Color3 G3D::Color4::bgr ( ) const
inline
static const Color4& G3D::Color4::clear ( )
static
void G3D::Color4::deserialize ( class BinaryInput bi)
static Color4 G3D::Color4::fromARGB ( uint32  )
static

Initialize from an HTML-style color (e.g.

0xFFFF0000 == RED)

bool G3D::Color4::fuzzyEq ( const Color4 other) const
inline
bool G3D::Color4::fuzzyNe ( const Color4 other) const
inline
size_t G3D::Color4::hashCode ( ) const
static const Color4& G3D::Color4::inf ( )
static
bool G3D::Color4::isFinite ( ) const
inline
bool G3D::Color4::isOne ( ) const
inline
bool G3D::Color4::isZero ( ) const
inline
Color4 G3D::Color4::lerp ( const Color4 other,
float  a 
) const
inline

Referenced by G3D::lerp().

Color4 G3D::Color4::max ( const Color4 other) const
inline

Referenced by G3D::max().

Color4 G3D::Color4::min ( const Color4 other) const
inline

Referenced by G3D::min().

static const Color4& G3D::Color4::nan ( )
static
static const Color4& G3D::Color4::one ( )
static
bool G3D::Color4::operator!= ( const Color4 rkVector) const
inline
Color4 G3D::Color4::operator* ( float  fScalar) const
inline
Color4 G3D::Color4::operator* ( const Color4 k) const
inline
Color4& G3D::Color4::operator*= ( const Color4 c)
inline
Color4 & G3D::Color4::operator*= ( float  fScalar)
inline
Color4 G3D::Color4::operator+ ( const Color4 rkVector) const
inline
Color4 & G3D::Color4::operator+= ( const Color4 rkVector)
inline
Color4 G3D::Color4::operator- ( const Color4 rkVector) const
inline
Color4 G3D::Color4::operator- ( ) const
inline
Color4 & G3D::Color4::operator-= ( const Color4 rkVector)
inline
Color4 G3D::Color4::operator/ ( float  fScalar) const
Color4& G3D::Color4::operator/= ( float  fScalar)
Color4 & G3D::Color4::operator= ( const Color4 rkVector)
inline
bool G3D::Color4::operator== ( const Color4 rkVector) const
inline
float & G3D::Color4::operator[] ( int  i) const
inline
Color3 G3D::Color4::rgb ( ) const
inline
void G3D::Color4::serialize ( class BinaryOutput bo) const
float G3D::Color4::sum ( ) const
inline

r + g + b + a

Any G3D::Color4::toAny ( ) const

Converts the Color4 to an Any.

std::string G3D::Color4::toString ( ) const
static const Color4& G3D::Color4::zero ( )
static

Friends And Related Function Documentation

Color4 operator* ( double  fScalar,
const Color4 rkVector 
)
friend

Member Data Documentation

float G3D::Color4::a
float G3D::Color4::b
float G3D::Color4::g
float G3D::Color4::r

documentation generated on Sat Jan 12 2013 22:49:54 using doxygen 1.8.2