DirectX Graphics 레퍼런스 Direct3D extension (D3DX) C/C++ 레퍼런스 구조체 D3DXMATRIX   [목차열람] [주소복사] [슬롯비우기]
D3DXMATRIX 구조체
 
Microsoft DirectX 9.0

D3DXMATRIX 구조체


행렬을 기술한다.

구문

typedef struct D3DXMATRIX : public D3DMATRIX {
public:
    D3DXMATRIX() {};
    D3DXMATRIX( CONST FLOAT * );
    D3DXMATRIX( CONST D3DMATRIX& );
    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;

주의

이 구조체는 D3DMATRIX 구조체의 멤버를 계승한다. C 의 프로그래머는 D3DXMATRIX 구조체를 사용할 수 없다. C 의 프로그래머는 D3DMATRIX 구조체를 사용할 필요가 있다.

Direct3D extension (D3DX)에서는, 투영 행렬의 _34 요소에 부의 값을 설정할 수 없다. 여기서 부의 값을 사용할 필요가 있는 경우는, 대신에 투영 행렬 전체를 -1 로 스케일 한다.

C++ 프로그래머는,D3DXMATRIX 확장 기능을 사용해, 연산자의 overload 기능이나 형태 변환 기능을 이용할 수 있다. 그것은, overload 된 생성자·대입 연산자·단항 연산자·2 항연산자 (등가 연산자를 포함한다)를 처리 한다.

구조체의 정보

헤더d3dx9math.h
최저한의 operating system Windows 98


© 2002 Microsoft Corporation. All rights reserved.
↑TOP