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