Wasabi
Public Member Functions | Public Attributes | Friends | List of all members
WColor Class Reference

#include <WMath.hpp>

Public Member Functions

 WColor (uint32_t hex)
 
 WColor (int hex)
 
 WColor (float fRGB)
 
 WColor (float fR, float fG, float fB)
 
 WColor (float fR, float fG, float fB, float fA)
 
 operator float * ()
 
 operator const float * ()
 
const WColor operator+ () const
 
const WColor operator- () const
 
const WColor operator+ (const WColor col) const
 
const WColor operator- (const WColor col) const
 
const WColor operator* (const WColor col) const
 
const WColor operator* (const float f) const
 
const WColor operator/ (const WColor col) const
 
const WColor operator/ (const float f) const
 
void operator+= (const WColor col)
 
void operator-= (const WColor col)
 
void operator*= (const WColor col)
 
void operator*= (const float f)
 
void operator/= (const WColor col)
 
void operator/= (const float f)
 
float & operator[] (const uint32_t index)
 
float operator[] (const uint32_t index) const
 
float & operator[] (const int index)
 
float operator[] (const int index) const
 
float & operator() (const uint32_t index)
 
float operator() (const uint32_t index) const
 
float & operator() (const int index)
 
float operator() (const int index) const
 
bool operator== (const WColor col) const
 
bool operator!= (const WColor col) const
 

Public Attributes

union {
   struct {
      float   r
 
      float   g
 
      float   b
 
      float   a
 
   } 
 
   float   components [4]
 
}; 
 

Friends

const friend WColor operator* (const float f, const WColor v)
 
const friend WColor operator/ (const float f, const WColor v)
 

Detailed Description

Represents a color.

Member Data Documentation

◆ a

float WColor::a

alpha component of the color

◆ b

float WColor::b

blue component of the color

◆ g

float WColor::g

green component of the color

◆ r

float WColor::r

red component of the color


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