10 #ifndef NO_PRAGMA_ONCE
15 #include "../Math/cVecT.h"
16 #include "../Math/MathDX.h"
50 explicit cColorf(
float r,
float g,
float b,
float a = 1.0f) noexcept
54 #ifdef D3DCOLORVALUE_DEFINED
55 explicit cColorf(
const D3DCOLORVALUE& v ) noexcept
60 #if defined(USE_DX) || defined(USE_DXM)
62 cColorf(
const XMFLOAT4& v ) noexcept
63 : cVecT4<float>( *(
const SUPER_t*) &v )
67 inline operator const XMFLOAT4*()
const noexcept
72 inline void Set(
const XMVECTOR& v) noexcept
76 inline operator XMVECTOR () const noexcept
78 return ::XMLoadFloat4((
const XMFLOAT4*)
this);
85 return RGB((BYTE)(r * 255), (BYTE)(
g * 255), (BYTE)(b * 255));
90 return D3DCOLOR_ARGB((BYTE)(a * 255), (BYTE)(r * 255), (BYTE)(
g * 255), (BYTE)(b * 255));
119 ::XMColorModulate( (D3DXCOLOR*)
this, (D3DXCOLOR*)
this, (D3DXCOLOR*) &rColor);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Using X files without the sources and the makefile How to use you just create a debug directory e g
Definition: Readme.txt:21
#define D3DCOLOR_ARGB(a, r, g, b)
Definition: cColorRef.h:28
DWORD D3DCOLOR
Stuff normally defined in windows.h or DirectX headers.
Definition: cColorRef.h:24
UINT32 COLORREF
ABGR (high to low bits)
Definition: cVariantData.h:21
static COLOR_ELEM_t GetR(D3DCOLOR color) noexcept
Definition: cColorRef.h:184
static COLOR_ELEM_t GetA(D3DCOLOR color) noexcept
Definition: cColorRef.h:179
static COLOR_ELEM_t GetB(D3DCOLOR color) noexcept
Definition: cColorRef.h:194
static COLOR_ELEM_t GetG(D3DCOLOR color) noexcept
Definition: cColorRef.h:189
D3DCOLOR get_ColorDX() const noexcept
Definition: cColorf.h:87
cColorf(float r, float g, float b, float a=1.0f) noexcept
Definition: cColorf.h:50
float get_R() const noexcept
Definition: cColorf.h:98
cColorf(const SUPER_t &v) noexcept
Definition: cColorf.h:41
void SetModulate(const cColorf &rColor)
Definition: cColorf.h:115
cColorf() noexcept
Definition: cColorf.h:33
cColorf(D3DCOLOR c) noexcept
Definition: cColorf.h:35
cColorf(const float *f) noexcept
Definition: cColorf.h:44
COLORREF get_ColorRef() const noexcept
Definition: cColorf.h:82
cColorf(D3DCOLOR_TYPE_ c) noexcept
Definition: cColorf.h:38
float get_A() const noexcept
Definition: cColorf.h:110
float get_B() const noexcept
Definition: cColorf.h:106
float get_G() const noexcept
Definition: cColorf.h:102
cColorf(const cVecT3< float > &v, float a) noexcept
Definition: cColorf.h:47
UNITTEST2_PREDEF(cQuadtree)
D3DCOLOR_TYPE_
Definition: cColorRef.h:471