sead
Loading...
Searching...
No Matches
sead::Color4f Struct Reference

#include <seadColor.h>

Public Member Functions

 Color4f ()
 Color4f (f32 _r, f32 _g, f32 _b, f32 _a)
void setf (f32 _r, f32 _g, f32 _b, f32 _a)
void setLerp (const Color4f &from, const Color4f &to, f32 ratio)
Color4foperator+= (const Color4f &rhs)
Color4foperator*= (const Color4f &rhs)
Color4foperator*= (f32 rhs)

Public Attributes

union { 
   struct { 
      f32   r 
      f32   g 
      f32   b 
      f32   a 
   } 
   struct { 
      f32   c [4] 
   } 
}; 

Static Public Attributes

static const f32 cElementMax = 1.0f
static const f32 cElementMin = 0.0f
static const Color4f cBlack
static const Color4f cGray
static const Color4f cWhite
static const Color4f cRed
static const Color4f cGreen
static const Color4f cBlue
static const Color4f cYellow
static const Color4f cMagenta
static const Color4f cCyan

Friends

Color4f operator* (const Color4f &lhs, const Color4f &rhs)
Color4f operator* (const Color4f &lhs, f32 rhs)
bool operator== (const Color4f &lhs, const Color4f &rhs)

Constructor & Destructor Documentation

◆ Color4f() [1/2]

sead::Color4f::Color4f ( )
inline

◆ Color4f() [2/2]

sead::Color4f::Color4f ( f32 _r,
f32 _g,
f32 _b,
f32 _a )
inline

Member Function Documentation

◆ setf()

void sead::Color4f::setf ( f32 _r,
f32 _g,
f32 _b,
f32 _a )
inline

◆ setLerp()

void sead::Color4f::setLerp ( const Color4f & from,
const Color4f & to,
f32 ratio )

◆ operator+=()

Color4f & sead::Color4f::operator+= ( const Color4f & rhs)

◆ operator*=() [1/2]

Color4f & sead::Color4f::operator*= ( const Color4f & rhs)

◆ operator*=() [2/2]

Color4f & sead::Color4f::operator*= ( f32 rhs)

◆ operator* [1/2]

Color4f operator* ( const Color4f & lhs,
const Color4f & rhs )
friend

◆ operator* [2/2]

Color4f operator* ( const Color4f & lhs,
f32 rhs )
friend

◆ operator==

bool operator== ( const Color4f & lhs,
const Color4f & rhs )
friend

Member Data Documentation

◆ r

f32 sead::Color4f::r

◆ g

f32 sead::Color4f::g

◆ b

f32 sead::Color4f::b

◆ a

f32 sead::Color4f::a

◆ c

f32 sead::Color4f::c[4]

◆ [union]

union { ... } sead::Color4f

◆ cElementMax

const f32 sead::Color4f::cElementMax = 1.0f
static

◆ cElementMin

const f32 sead::Color4f::cElementMin = 0.0f
static

◆ cBlack

const Color4f sead::Color4f::cBlack
static

◆ cGray

const Color4f sead::Color4f::cGray
static

◆ cWhite

const Color4f sead::Color4f::cWhite
static

◆ cRed

const Color4f sead::Color4f::cRed
static

◆ cGreen

const Color4f sead::Color4f::cGreen
static

◆ cBlue

const Color4f sead::Color4f::cBlue
static

◆ cYellow

const Color4f sead::Color4f::cYellow
static

◆ cMagenta

const Color4f sead::Color4f::cMagenta
static

◆ cCyan

const Color4f sead::Color4f::cCyan
static