Platform SDK: DirectX

D3DXCOLOR 拡張機能

D3DX_DEVICEDESC は、次の演算子オーバーロードと型変換を提供している。

#ifdef __cplusplus
public:
  D3DXCOLOR() {}
  D3DXCOLOR( DWORD argb );
  D3DXCOLOR( const float * );
  D3DXCOLOR( const D3DCOLORVALUE& );
  D3DXCOLOR( float r, float g, float b, float a );
 
  // 変換
  operator DWORD () const;
 
  operator float * ();
  operator const float * () const;
 
  operator D3DCOLORVALUE * ();
  operator const D3DCOLORVALUE * () const;
 
// 代入演算子
  D3DXCOLOR& operator += ( const D3DXCOLOR& );
  D3DXCOLOR& operator -= ( const D3DXCOLOR& );
  D3DXCOLOR& operator *= ( float );
  D3DXCOLOR& operator /= ( float );
 
// 単項演算子
  D3DXCOLOR operator + () const;
  D3DXCOLOR operator - () const;
 
// 2 項演算子
  D3DXCOLOR operator + ( const D3DXCOLOR& ) const;
  D3DXCOLOR operator - ( const D3DXCOLOR& ) const;
  D3DXCOLOR operator * ( float ) const;
  D3DXCOLOR operator / ( float ) const;
 
  friend D3DXCOLOR operator * (float, const D3DXCOLOR& );
 
  BOOL operator == ( const D3DXCOLOR& ) const;
  BOOL operator != ( const D3DXCOLOR& ) const;
 
#endif //__cplusplus