D3DMXMATRIX (Windows Embedded CE 6.0)

1/6/2010

This structure describes a matrix and its operators for floating point numbers.

Syntax

typedef struct D3DMXMATRIX {
#ifdef __cplusplus
public:
  D3DMXMATRIX() {};
  D3DMXMATRIX( CONST FLOAT * );
  D3DMXMATRIX( CONST D3DMMATRIX& );
  D3DMXMATRIX( 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
  D3DMXMATRIX& operator *= ( CONST D3DMXMATRIX& );
  D3DMXMATRIX& operator += ( CONST D3DMXMATRIX& );
  D3DMXMATRIX& operator -= ( CONST D3DMXMATRIX& );
  D3DMXMATRIX& operator *= ( FLOAT );
  D3DMXMATRIX& operator /= ( FLOAT );
  // unary operators
  D3DMXMATRIX operator + () const;
  D3DMXMATRIX operator - () const;
  // binary operators
  D3DMXMATRIX operator * ( CONST D3DMXMATRIX& ) const;
  D3DMXMATRIX operator + ( CONST D3DMXMATRIX& ) const;
  D3DMXMATRIX operator - ( CONST D3DMXMATRIX& ) const;
  D3DMXMATRIX operator * ( FLOAT ) const;
  D3DMXMATRIX operator / ( FLOAT ) const;
  friend D3DMXMATRIX operator * ( FLOAT, CONST D3DMXMATRIX& );
  BOOL operator == ( CONST D3DMXMATRIX& ) const;
  BOOL operator != ( CONST D3DMXMATRIX& ) const;
#endif //__cplusplus
  union {
    struct {
      FLOAT   _11, _12, _13, _14;
      FLOAT   _21, _22, _23, _24;
      FLOAT   _31, _32, _33, _34;
      FLOAT   _41, _42, _43, _44;
    };
    FLOAT m[4][4];
  };
} D3DMXMATRIX, *LPD3DMXMATRIX;

Members

  • _11, _12, ... , _44and m[ i][ j]
    The members of the structure are the floating point values that make up the elements of a 4x4 matrix.

Remarks

In Direct3D Mobile extensions (D3DMX), the _34 element of a projection matrix cannot be a negative number. If your application needs to use a negative value in this location, it should scale the entire projection matrix by -1, instead.

C++ programmers can take advantage of operator overloading and type casting.

Requirements

Header d3dmx.h
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

D3DMX Structures
D3DMXMATRIXFXD