Platform SDK: DirectX |
D3DXVECTOR3 構造体は、次の演算子オーバーロードと型変換を提供している。
#ifdef __cplusplus public: D3DXVECTOR3() {}; D3DXVECTOR3( const float * ); D3DXVECTOR3( const D3DVECTOR& ); D3DXVECTOR3( float x, float y, float z ); // 変換 operator float* (); operator const float* () const; operator D3DVECTOR* (); operator const D3DVECTOR* () const; // 代入演算子 D3DXVECTOR3& operator += ( const D3DXVECTOR3& ); D3DXVECTOR3& operator -= ( const D3DXVECTOR3& ); D3DXVECTOR3& operator *= ( float ); D3DXVECTOR3& operator /= ( float ); // 単項演算子 D3DXVECTOR3 operator + () const; D3DXVECTOR3 operator - () const; // 2 項演算子 D3DXVECTOR3 operator + ( const D3DXVECTOR3& ) const; D3DXVECTOR3 operator - ( const D3DXVECTOR3& ) const; D3DXVECTOR3 operator * ( float ) const; D3DXVECTOR3 operator / ( float ) const; friend D3DXVECTOR3 operator * ( float, const struct D3DXVECTOR3& ); BOOL operator == ( const D3DXVECTOR3& ) const; BOOL operator != ( const D3DXVECTOR3& ) const; public: #endif //__cplusplus