Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

typedef struct D3DMXMATRIXFXD {
#ifdef __cplusplus
  public:
	D3DMXMATRIXFXD() {};
	D3DMXMATRIXFXD( CONST FIXED * );
	D3DMXMATRIXFXD( CONST D3DMMATRIX& );
	D3DMXMATRIXFXD( FIXED 
_11, FIXED 
_12, FIXED 
_13, FIXED 
_14,
					FIXED 
_21, FIXED 
_22, FIXED 
_23, FIXED 
_24,
					FIXED 
_31, FIXED 
_32, FIXED 
_33, FIXED 
_34,
					FIXED 
_41, FIXED 
_42, FIXED 
_43, FIXED 
_44 );
	// access grants
	FIXED& operator () ( UINT 
Row, UINT 
Col );
	FIXED  operator () ( UINT 
Row, UINT 
Col ) const;
	// casting operators
	operator FIXED* ();
	operator CONST FIXED* () const;
	// assignment operators
	D3DMXMATRIXFXD& operator *= ( CONST D3DMXMATRIXFXD& );
	D3DMXMATRIXFXD& operator += ( CONST D3DMXMATRIXFXD& );
	D3DMXMATRIXFXD& operator -= ( CONST D3DMXMATRIXFXD& );
	D3DMXMATRIXFXD& operator *= ( FIXED );
	D3DMXMATRIXFXD& operator /= ( FIXED );
	// unary operators
	D3DMXMATRIXFXD operator + () const;
	D3DMXMATRIXFXD operator - () const;
	// binary operators
	D3DMXMATRIXFXD operator * ( CONST D3DMXMATRIXFXD& ) const;
	D3DMXMATRIXFXD operator + ( CONST D3DMXMATRIXFXD& ) const;
	D3DMXMATRIXFXD operator - ( CONST D3DMXMATRIXFXD& ) const;
	D3DMXMATRIXFXD operator * ( FIXED ) const;
	D3DMXMATRIXFXD operator / ( FIXED ) const;
	friend D3DMXMATRIXFXD operator * ( FIXED, CONST
D3DMXMATRIXFXD& );
	BOOL operator == ( CONST D3DMXMATRIXFXD& ) const;
	BOOL operator != ( CONST D3DMXMATRIXFXD& ) const;
#endif //__cplusplus
  union {
	struct {
		FIXED   
_11, 
_12, 
_13, 
_14;
		FIXED   
_21, 
_22, 
_23, 
_24;
		FIXED   
_31, 
_32, 
_33, 
_34;
		FIXED   
_41, 
_42, 
_43, 
_44;
};
	FIXED 
m[4][4];
  };
} D3DMXMATRIXFXD, *LPD3DMXMATRIXFXD;

Members

_11, _12, ... , _44and m[ i][ j]

The members of the structure are the fixed 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
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also