D3DXMATRIX 構造体 (D3dx9math.h)

Note

D3DX ユーティリティ ライブラリは非推奨です。 代わりに DirectXMath を使用することをお勧めします。

メソッドと演算子のオーバーロードを含む 4 x 4 行列。

構文

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

メンバー

_Ij

型: FLOAT

行列の (i, j) コンポーネント。ここで、i は行番号、j は列番号です。 たとえば、_34 は、[a₃₄] と同じで、3 行目と 4 列目のコンポーネントを意味します。

注釈

C プログラマは D3DXMATRIX 構造体を使用できません。 D3DMATRIX 構造体を使用する必要があります。 C++ プログラマは、オーバーロードされたコンストラクターと代入、単項、バイナリ (等値を含む) 演算子を利用できます。

D3DX では、射影行列の _34 要素を負の数にすることはできません。 アプリケーションでこの場所で負の値を使用する必要がある場合は、代わりに射影行列全体を -1 でスケーリングする必要があります。

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

要件

要件
ヘッダー
D3dx9math.h

こちらもご覧ください

D3DX 構造体

D3DMATRIX