Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cColorf Class Reference

#include <cColorf.h>

Inheritance diagram for GrayLib::cColorf:
GrayLib::cVecT4< float > GrayLib::cVecTC< float, 4, cVecT4< float > >

Public Member Functions

 cColorf () noexcept
 
 cColorf (D3DCOLOR c) noexcept
 
 cColorf (D3DCOLOR_TYPE_ c) noexcept
 
 cColorf (const SUPER_t &v) noexcept
 
 cColorf (const float *f) noexcept
 
 cColorf (const cVecT3< float > &v, float a) noexcept
 
 cColorf (float r, float g, float b, float a=1.0f) noexcept
 
COLORREF get_ColorRef () const noexcept
 
D3DCOLOR get_ColorDX () const noexcept
 
 operator D3DCOLOR () const noexcept
 
float get_R () const noexcept
 
float get_G () const noexcept
 
float get_B () const noexcept
 
float get_A () const noexcept
 
void SetModulate (const cColorf &rColor)
 
 UNITTEST_FRIEND (cColorf)
 
- Public Member Functions inherited from GrayLib::cVecT4< float >
 cVecT4 () noexcept
 
 cVecT4 (const SUPER_t &v) noexcept
 
 cVecT4 (const float *pVals) noexcept
 
 cVecT4 (float n0, float n1, float n2=0, float n3=0) noexcept
 
 cVecT4 (const cVecT3< float > &v2, float _w=0)
 
const float & get_X () const noexcept
 
const float & get_Y () const noexcept
 
const float & get_Z () const noexcept
 
const float & get_W () const noexcept
 
const cVecT3< float > & get_V3 () const noexcept
 
cVecT3< float > & ref_V3 () noexcept
 
void InitCross (const THIS_t &v1, const THIS_t &v2, const THIS_t &v3)
 
- Public Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
float * get_T () noexcept
 
const float * get_CT () const noexcept
 
const cVecT4< float > & get_CR () const noexcept
 
 operator const float * () const noexcept
 
float GetElem (int i) const noexcept
 
float operator[] (int i) const noexcept
 
float & operator[] (int i)
 
bool isZero () const noexcept
 
COMPARE_t Compare (const THIS_t &v2) const noexcept
 
bool operator== (const THIS_t &v2) const noexcept
 
bool operator!= (const THIS_t &v2) const noexcept
 
bool IsNear (const THIS_t &v2, float fDist=(float) k_FLT_MIN2) const
 
float get_MagnitudeSq () const noexcept
 
float get_Magnitude () const noexcept
 
cVecT4< float > operator- () const
 
cVecT4< float > operator- (const THIS_t &v2) const
 
cVecT4< float > get_Abs () const
 
cVecT4< float > GetSum (const THIS_t &v2) const
 
cVecT4< float > operator+ (const THIS_t &v2) const
 
cVecT4< float > GetDiff (const THIS_t &v2) const
 
cVecT4< float > GetScaled (float nScale) const
 
cVecT4< float > operator* (float nScale) const
 
cVecT4< float > operator/ (float nScale) const
 
cVecT4< float > GetMul (const THIS_t &v2) const
 
cVecT4< float > GetDiv (const THIS_t &v2) const
 
float GetDistSq (const THIS_t &v2) const
 
float GetDist (const THIS_t &v2) const
 
float GetDot (const THIS_t &v2) const
 
cVecT4< float > get_Normalized () const
 
 operator float * ()
 
float & RefElem (int i) noexcept
 
void Set (const THIS_t &v)
 
void SetZero () noexcept
 
float SetNormalized (void) noexcept
 
bool put_Magnitude (float nLength)
 
void SetLerp (const THIS_t &a, const THIS_t &b, DVALUE_t t)
 
const cVecT4< float > & operator+= (const THIS_t &v2)
 
const cVecT4< float > & operator+= (float n)
 
const cVecT4< float > & operator-= (const THIS_t &v2) noexcept
 
const cVecT4< float > & operator-= (float n) noexcept
 
void DoScale (float n) noexcept
 
const cVecT4< float > & operator*= (float nScale) noexcept
 
cVecT4< float > & operator*= (const THIS_t &v2) noexcept
 
const cVecT4< float > & operator/= (float nScale)
 
cVecT4< float > & operator/= (const THIS_t &v2)
 
void DoMul (const THIS_t &v2) noexcept
 
void DoDiv (const THIS_t &v2)
 

Additional Inherited Members

- Public Types inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
typedef float DVALUE_t
 Dimension value type. More...
 
typedef cVecTC< float, _IQTY, cVecT4< float > > THIS_t
 
- Static Public Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
static float GetDot (const THIS_t &v1, const THIS_t &v2)
 
- Public Attributes inherited from GrayLib::cVecT4< float >
float m_a [4]
 
float m_x
 
float m_y
 
float m_z
 
float m_w
 
float x
 
float y
 
float z
 
float w
 
float r
 
float g
 
float b
 
float a
 
union {
   TYPE   m_a [4]
 
   struct {
      TYPE   m_x
 
      TYPE   m_y
 
      TYPE   m_z
 
      TYPE   m_w
 
   } 
 
   struct {
      TYPE   x
 
      TYPE   y
 
      TYPE   z
 
      TYPE   w
 
   } 
 
   struct {
      TYPE   r
 
      TYPE   g
 
      TYPE   b
 
      TYPE   a
 
   } 
 
}; 
 
- Static Public Attributes inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
static const int k_nDim
 
- Protected Member Functions inherited from GrayLib::cVecTC< float, 4, cVecT4< float > >
 cVecTC ()
 

Detailed Description

a 4 part float point color pixel. r,g,b,a like D3DXCOLOR not D3DCOLOR or COLORREF. Each color element is stored as 0 to 1.0, NOT 0 to 255 as in D3DCOLOR and COLORREF has same storage as D3DXPLANE and XMFLOAT4. D3DCOLORVALUE

Constructor & Destructor Documentation

◆ cColorf() [1/7]

GrayLib::cColorf::cColorf ( )
inlinenoexcept

◆ cColorf() [2/7]

GrayLib::cColorf::cColorf ( D3DCOLOR  c)
inlinenoexcept

◆ cColorf() [3/7]

GrayLib::cColorf::cColorf ( D3DCOLOR_TYPE_  c)
inlinenoexcept

◆ cColorf() [4/7]

GrayLib::cColorf::cColorf ( const SUPER_t v)
inlinenoexcept

◆ cColorf() [5/7]

GrayLib::cColorf::cColorf ( const float *  f)
inlineexplicitnoexcept

◆ cColorf() [6/7]

GrayLib::cColorf::cColorf ( const cVecT3< float > &  v,
float  a 
)
inlineexplicitnoexcept

◆ cColorf() [7/7]

GrayLib::cColorf::cColorf ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
inlineexplicitnoexcept

Member Function Documentation

◆ get_A()

float GrayLib::cColorf::get_A ( ) const
inlinenoexcept

◆ get_B()

float GrayLib::cColorf::get_B ( ) const
inlinenoexcept

◆ get_ColorDX()

D3DCOLOR GrayLib::cColorf::get_ColorDX ( ) const
inlinenoexcept

Pack color into 32 bits. assume D3DCOLOR format

◆ get_ColorRef()

COLORREF GrayLib::cColorf::get_ColorRef ( ) const
inlinenoexcept

convert color to 32 bit COLORREF

◆ get_G()

float GrayLib::cColorf::get_G ( ) const
inlinenoexcept

◆ get_R()

float GrayLib::cColorf::get_R ( ) const
inlinenoexcept

◆ operator D3DCOLOR()

GrayLib::cColorf::operator D3DCOLOR ( ) const
inlinenoexcept

assume D3DCOLOR format

◆ SetModulate()

void GrayLib::cColorf::SetModulate ( const cColorf rColor)
inline

this = this * rColor, D3DXColorModulate

◆ UNITTEST_FRIEND()

GrayLib::cColorf::UNITTEST_FRIEND ( cColorf  )

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