Platform SDK: DirectX

D3DXVECTOR2 拡張機能

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

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