NW4F Sys
Loading...
Searching...
No Matches
nw::ut::FloatColor Struct Reference

#include <ut_Color.h>

Public Types

typedef FloatColor SelfType

Public Member Functions

 FloatColor ()
 FloatColor (const nw::math::VEC4 &vec)
 FloatColor (const SelfType &color)
 FloatColor (const SelfType &color, f32 alpha)
 FloatColor (f32 red, f32 green, f32 blue, f32 alpha)
FloatColoroperator= (const FloatColor &other)=default
 ~FloatColor ()
SelfTypeoperator= (const nw::math::VEC4 &vec)
 operator f32 * ()
 operator const f32 * () const
const SelfType operator+ (const SelfType &right) const
const SelfType operator- (const SelfType &right) const
const SelfType operator* (const SelfType &right) const
const SelfType operator/ (const SelfType &right) const
SelfTypeoperator+= (const SelfType &rhs)
SelfTypeoperator-= (const SelfType &rhs)
SelfTypeoperator*= (const SelfType &rhs)
SelfTypeoperator/= (const SelfType &rhs)
SelfTypeoperator+= (f32 right)
SelfTypeoperator-= (f32 right)
SelfTypeoperator*= (f32 right)
SelfTypeoperator/= (f32 right)
bool operator== (const SelfType &rhs) const
bool operator!= (const SelfType &rhs) const
void Set (f32 red, f32 green, f32 blue, f32 alpha=ALPHA_OPACITY)
void SetColor (f32 red, f32 green, f32 blue)
void SetAlpha (f32 alpha)
void Set (const SelfType &color)
bool IsTransparent ()
f32 * ToArray ()
const f32 * ToArray () const

Public Attributes

f32 r
f32 g
f32 b
f32 a

Static Public Attributes

static const int ELEMENT_MIN = 0
static const int ELEMENT_MAX = 1
static const int ALPHA_MIN = ELEMENT_MIN
static const int ALPHA_MAX = ELEMENT_MAX
static const int ALPHA_OPACITY = ALPHA_MAX
static const int ALPHA_TRANSPARENT = ALPHA_MIN

Protected Member Functions

nw::math::VEC4ToVEC4 ()
const nw::math::VEC4ToVEC4 () const

Member Typedef Documentation

◆ SelfType

Constructor & Destructor Documentation

◆ FloatColor() [1/5]

nw::ut::FloatColor::FloatColor ( )
inline

◆ FloatColor() [2/5]

nw::ut::FloatColor::FloatColor ( const nw::math::VEC4 & vec)
inlineexplicit

◆ FloatColor() [3/5]

nw::ut::FloatColor::FloatColor ( const SelfType & color)
inline

◆ FloatColor() [4/5]

nw::ut::FloatColor::FloatColor ( const SelfType & color,
f32 alpha )
inline

◆ FloatColor() [5/5]

nw::ut::FloatColor::FloatColor ( f32 red,
f32 green,
f32 blue,
f32 alpha )
inline

◆ ~FloatColor()

nw::ut::FloatColor::~FloatColor ( )
inline

Member Function Documentation

◆ operator=() [1/2]

FloatColor & nw::ut::FloatColor::operator= ( const FloatColor & other)
default

◆ operator=() [2/2]

SelfType & nw::ut::FloatColor::operator= ( const nw::math::VEC4 & vec)
inline

◆ operator f32 *()

nw::ut::FloatColor::operator f32 * ( )
inline

◆ operator const f32 *()

nw::ut::FloatColor::operator const f32 * ( ) const
inline

◆ operator+()

const SelfType nw::ut::FloatColor::operator+ ( const SelfType & right) const
inline

◆ operator-()

const SelfType nw::ut::FloatColor::operator- ( const SelfType & right) const
inline

◆ operator*()

const SelfType nw::ut::FloatColor::operator* ( const SelfType & right) const
inline

◆ operator/()

const SelfType nw::ut::FloatColor::operator/ ( const SelfType & right) const
inline

◆ operator+=() [1/2]

SelfType & nw::ut::FloatColor::operator+= ( const SelfType & rhs)
inline

◆ operator-=() [1/2]

SelfType & nw::ut::FloatColor::operator-= ( const SelfType & rhs)
inline

◆ operator*=() [1/2]

SelfType & nw::ut::FloatColor::operator*= ( const SelfType & rhs)
inline

◆ operator/=() [1/2]

SelfType & nw::ut::FloatColor::operator/= ( const SelfType & rhs)
inline

◆ operator+=() [2/2]

SelfType & nw::ut::FloatColor::operator+= ( f32 right)
inline

◆ operator-=() [2/2]

SelfType & nw::ut::FloatColor::operator-= ( f32 right)
inline

◆ operator*=() [2/2]

SelfType & nw::ut::FloatColor::operator*= ( f32 right)
inline

◆ operator/=() [2/2]

SelfType & nw::ut::FloatColor::operator/= ( f32 right)
inline

◆ operator==()

bool nw::ut::FloatColor::operator== ( const SelfType & rhs) const
inline

◆ operator!=()

bool nw::ut::FloatColor::operator!= ( const SelfType & rhs) const
inline

◆ Set() [1/2]

void nw::ut::FloatColor::Set ( f32 red,
f32 green,
f32 blue,
f32 alpha = ALPHA_OPACITY )
inline

◆ SetColor()

void nw::ut::FloatColor::SetColor ( f32 red,
f32 green,
f32 blue )
inline

◆ SetAlpha()

void nw::ut::FloatColor::SetAlpha ( f32 alpha)
inline

◆ Set() [2/2]

void nw::ut::FloatColor::Set ( const SelfType & color)
inline

◆ IsTransparent()

bool nw::ut::FloatColor::IsTransparent ( )
inline

◆ ToArray() [1/2]

f32 * nw::ut::FloatColor::ToArray ( )
inline

◆ ToArray() [2/2]

const f32 * nw::ut::FloatColor::ToArray ( ) const
inline

◆ ToVEC4() [1/2]

nw::math::VEC4 & nw::ut::FloatColor::ToVEC4 ( )
inlineprotected

◆ ToVEC4() [2/2]

const nw::math::VEC4 & nw::ut::FloatColor::ToVEC4 ( ) const
inlineprotected

Member Data Documentation

◆ ELEMENT_MIN

const int nw::ut::FloatColor::ELEMENT_MIN = 0
static

◆ ELEMENT_MAX

const int nw::ut::FloatColor::ELEMENT_MAX = 1
static

◆ ALPHA_MIN

const int nw::ut::FloatColor::ALPHA_MIN = ELEMENT_MIN
static

◆ ALPHA_MAX

const int nw::ut::FloatColor::ALPHA_MAX = ELEMENT_MAX
static

◆ ALPHA_OPACITY

const int nw::ut::FloatColor::ALPHA_OPACITY = ALPHA_MAX
static

◆ ALPHA_TRANSPARENT

const int nw::ut::FloatColor::ALPHA_TRANSPARENT = ALPHA_MIN
static

◆ r

f32 nw::ut::FloatColor::r

◆ g

f32 nw::ut::FloatColor::g

◆ b

f32 nw::ut::FloatColor::b

◆ a

f32 nw::ut::FloatColor::a