Structure D3DXVECTOR2 (D3DX10Math.h)
Notes
La bibliothèque utilitaire D3DX10 est déconseillée. Nous vous recommandons d’utiliser DirectXMath à la place.
Décrit un vecteur à deux composants, y compris les surcharges d’opérateurs et les casts de type.
Syntaxe
typedef struct D3DXVECTOR2 {
FLOAT x;
FLOAT y;
} D3DXVECTOR2, *LPD3DXVECTOR2;
Membres
Notes
D3DXVECTOR2 a les extensions C++ suivantes.
Extensions D3DXVECTOR2
typedef struct D3DXVECTOR2
{
#ifdef __cplusplus
public:
D3DXVECTOR2() {};
D3DXVECTOR2( CONST FLOAT * );
D3DXVECTOR2( CONST D3DXFLOAT16 * );
D3DXVECTOR2( FLOAT x, FLOAT y );
// casting
operator FLOAT* ();
operator CONST FLOAT* () const;
// assignment operators
D3DXVECTOR2& operator += ( CONST D3DXVECTOR2& );
D3DXVECTOR2& operator -= ( CONST D3DXVECTOR2& );
D3DXVECTOR2& operator *= ( FLOAT );
D3DXVECTOR2& operator /= ( FLOAT );
// unary operators
D3DXVECTOR2 operator + () const;
D3DXVECTOR2 operator - () const;
// binary operators
D3DXVECTOR2 operator + ( CONST D3DXVECTOR2& ) const;
D3DXVECTOR2 operator - ( CONST D3DXVECTOR2& ) const;
D3DXVECTOR2 operator * ( FLOAT ) const;
D3DXVECTOR2 operator / ( FLOAT ) const;
friend D3DXVECTOR2 operator * ( FLOAT, CONST D3DXVECTOR2& );
BOOL operator == ( CONST D3DXVECTOR2& ) const;
BOOL operator != ( CONST D3DXVECTOR2& ) const;
public:
#endif //__cplusplus
FLOAT x, y;
} D3DXVECTOR2, *LPD3DXVECTOR2;
Spécifications
Condition requise | Valeur |
---|---|
En-tête |
|
Voir aussi