Microsoft DirectX 8.1 (C++) |
Describes a matrix.
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;
This structure inherits members from the D3DMATRIX structure. C programmers cannot use the D3DXMATRIX structure. They must use the D3DMATRIX structure.
In Direct3DX, 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. The C++ implementation of the D3DXMATRIX structure implements overloaded constructors and overloaded assignment, unary, and binary (including equality) operators. For more information, see C++ Specific Features.
Header: Declared in D3dx8math.h.