Platform SDK: DirectX

D3DXQUATERNION Extensions

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

#ifdef __cplusplus
public:
  D3DXQUATERNION() {}
  D3DXQUATERNION( const float * );
  D3DXQUATERNION( float x, float y, float z, float w );
 
  // casting
  operator float* ();
  operator const float* () const;
 
  // assignment operators
  D3DXQUATERNION& operator += ( const D3DXQUATERNION& );
  D3DXQUATERNION& operator -= ( const D3DXQUATERNION& );
  D3DXQUATERNION& operator *= ( const D3DXQUATERNION& );
  D3DXQUATERNION& operator *= ( float );
  D3DXQUATERNION& operator /= ( float );
 
  // unary operators
  D3DXQUATERNION  operator + () const;
  D3DXQUATERNION  operator - () const;
 
  // binary operators
  D3DXQUATERNION operator + ( const D3DXQUATERNION& ) const;
  D3DXQUATERNION operator - ( const D3DXQUATERNION& ) const;
  D3DXQUATERNION operator * ( const D3DXQUATERNION& ) const;
  D3DXQUATERNION operator * ( float ) const;
  D3DXQUATERNION operator / ( float ) const;
 
  friend D3DXQUATERNION operator * (float, const D3DXQUATERNION& );
 
  BOOL operator == ( const D3DXQUATERNION& ) const;
  BOOL operator != ( const D3DXQUATERNION& ) const;
 
#endif //__cplusplus