Platform SDK: DirectX

D3DXMATRIX Extensions

The D3DXMATRIX structure supplies the following operator overloads and type casts.

#ifdef __cplusplus
public:
  D3DXMATRIX() {};
  D3DXMATRIX( const float * );
  D3DXMATRIX( const D3DMATRIX& );
  D3DXMATRIX( float m00, float m01, float m02, float m03,
              float m10, float m11, float m12, float m13,
              float m20, float m21, float m22, float m23,
              float m30, float m31, float m32, float m33 );
 
 
  // access grants
  float& operator () ( UINT iRow, UINT iCol );
  float  operator () ( UINT iRow, UINT iCol ) const;
 
  // casting operators
  operator float* ();
  operator const float* () const;
 
  operator D3DMATRIX* ();
  operator const D3DMATRIX* () 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;
 
 
#endif //__cplusplus
 
  union
  {
    float m[4][4];
#ifdef __cplusplus
    struct
    {
      float m00, m01, m02, m03;
      float m10, m11, m12, m13;
      float m20, m21, m22, m23;
      float m30, m31, m32, m33;
    };
#endif //__cplusplus