Platform SDK: DirectX

D3DXVECTOR3 Extensions

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

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