Platform SDK: DirectX

D3DXVECTOR4 拡張機能

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

#ifdef __cplusplus
public:
  D3DXVECTOR4() {};
  D3DXVECTOR4( const float* );
  D3DXVECTOR4( float x, float y, float z, float w );
 
  // 変換
  operator float* ();
  operator const float* () const;
 
// 代入演算子
  D3DXVECTOR4& operator += ( const D3DXVECTOR4& );
  D3DXVECTOR4& operator -= ( const D3DXVECTOR4& );
  D3DXVECTOR4& operator *= ( float );
  D3DXVECTOR4& operator /= ( float );
 
// 単項演算子
  D3DXVECTOR4 operator + () const;
  D3DXVECTOR4 operator - () const;
 
// 2 項演算子
  D3DXVECTOR4 operator + ( const D3DXVECTOR4& ) const;
  D3DXVECTOR4 operator - ( const D3DXVECTOR4& ) const;
  D3DXVECTOR4 operator * ( float ) const;
  D3DXVECTOR4 operator / ( float ) const;
 
  friend D3DXVECTOR4 operator * ( float, const D3DXVECTOR4& );
 
  BOOL operator == ( const D3DXVECTOR4& ) const;
  BOOL operator != ( const D3DXVECTOR4& ) const;
 
public:
#endif //__cplusplus