# D3DXMATRIX 結構 (D3DX10Math.h)

D3DX 公用程式程式庫已被取代。 建議您改用 DirectXMath

## 語法

``````typedef struct D3DXMATRIX {
FLOAT _ij;
} D3DXMATRIX, *LPD3DXMATRIX;
``````

_ij

## 備註

C 程式設計人員無法使用 D3DXMATRIX 結構，它們必須使用 D3DMATRIX 結構。 C++ 程式設計人員可以利用多載建構函式和指派、一元和二進位 (，包括相等) 運算子。

### D3DXMATRIX 延伸模組

D3DXMATRIX 具有下列 C++ 延伸模組。

``````#ifdef __cplusplus
typedef struct D3DXMATRIX : public D3DMATRIX
{
public:
D3DXMATRIX() {};
D3DXMATRIX( CONST FLOAT * );
D3DXMATRIX( CONST D3DMATRIX& );
D3DXMATRIX( CONST D3DXFLOAT16 * );
D3DXMATRIX( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14,
FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24,
FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34,
FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 );

// access grants
FLOAT& operator () ( UINT Row, UINT Col );
FLOAT  operator () ( UINT Row, UINT Col ) const;

// casting operators
operator FLOAT* ();
operator CONST FLOAT* () const;

// assignment operators
D3DXMATRIX& operator *= ( CONST D3DXMATRIX& );
D3DXMATRIX& operator += ( CONST D3DXMATRIX& );
D3DXMATRIX& operator -= ( CONST D3DXMATRIX& );
D3DXMATRIX& operator *= ( FLOAT );
D3DXMATRIX& operator /= ( FLOAT );

// unary operators
D3DXMATRIX operator + () const;
D3DXMATRIX operator - () const;

// binary operators
D3DXMATRIX operator * ( CONST D3DXMATRIX& ) const;
D3DXMATRIX operator + ( CONST D3DXMATRIX& ) const;
D3DXMATRIX operator - ( CONST D3DXMATRIX& ) const;
D3DXMATRIX operator * ( FLOAT ) const;
D3DXMATRIX operator / ( FLOAT ) const;

friend D3DXMATRIX operator * ( FLOAT, CONST D3DXMATRIX& );

BOOL operator == ( CONST D3DXMATRIX& ) const;
BOOL operator != ( CONST D3DXMATRIX& ) const;

} D3DXMATRIX, *LPD3DXMATRIX;

#else //!__cplusplus
typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX;
#endif //!__cplusplus

``````

D3DX10Math.h

D3DX 結構