# Vector3DVector3DVector3DVector3D Struct

## Définition

Représente un déplacement dans l'espace 3D.Represents a displacement in 3-D space.

``public value class Vector3D : IFormattable``
``````[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Vector3DConverter))]
[System.Serializable]
public struct Vector3D : IFormattable``````
``````type Vector3D = struct
interface IFormattable``````
``````Public Structure Vector3D
Implements IFormattable``````
Héritage
Vector3DVector3DVector3DVector3D
Attributs
Implémente

## Exemples

Cet exemple montre comment soustraire Vector3D structures à l’aide de l’opérateur de soustraction surchargé (`-`) opérateur et la Vector3D statique Subtract (méthode).This example shows how to subtract Vector3D structures using the overloaded subtraction (`-`) operator and the Vector3D static Subtract method.

Le code suivant montre comment utiliser le Vector3D méthodes de soustraction.The following code shows how to use the Vector3D subtraction methods. Tout d’abord, le Vector3D structures sont instanciés.First, the Vector3D structures are instantiated. Le Vector3D structures sont soustraites à l’aide de surchargées (`-`) opérateur et ils sont soustraites à l’aide de la méthode statique Subtract (méthode).The Vector3D structures are subtracted using the overloaded (`-`) operator, and then they are subtracted using the static Subtract method.

``````// Subtracts two 3-D Vectors using the Subtract method and -

// Declaring vector1 and initializing x,y,z values
Vector3D vector1 = new Vector3D(20, 30, 40);

// Declaring vector2 without initializing x,y,z values
Vector3D vector2 = new Vector3D();

// Assigning values to vector2
vector2.X = 45;
vector2.Y = 70;
vector2.Z = 80;

// Subtracting vectors using overload - operator
Vector3D vectorResult1 = new Vector3D();
vectorResult1 = vector1 - vector2;
// vectorResult1 is equal to (-25, -40, -40)

// Subtracting vectors using static Subtract method
Vector3D vectorResult2 = new Vector3D();
vectorResult2 = Vector3D.Subtract(vector1, vector2);
// vector2 is equal to (-25, -40, -40)
``````

## Remarques

### Utilisation d'attributs XAMLXAML Attribute Usage

``````<object property="x,y,z"/>
-or
<object property="x y z"/>
``````

### Valeurs XAMLXAML Values

xx
Composant X de cette structure Vector3D.The X component of this Vector3D structure.

yy
Composant Y de cette structure Vector3D.The Y component of this Vector3D structure.

zz
Composant Z de cette structure Vector3D.The Z component of this Vector3D structure.

## Constructeurs

 Vector3D(Double, Double, Double) Vector3D(Double, Double, Double) Vector3D(Double, Double, Double) Vector3D(Double, Double, Double) Initialise une nouvelle instance d’un Vector3D structure.Initializes a new instance of a Vector3D structure.

## Propriétés

 Length Length Length Length Obtient la longueur de cette Vector3D structure.Gets the length of this Vector3D structure. LengthSquared LengthSquared LengthSquared LengthSquared Obtient le carré de la longueur de cette Vector3D structure.Gets the square of the length of this Vector3D structure. X X X X Obtient ou définit le composant X de cette structure Vector3D.Gets or sets the X component of this Vector3D structure. Y Y Y Y Obtient ou définit le composant Y de cette structure Vector3D.Gets or sets the Y component of this Vector3D structure. Z Z Z Z Obtient ou définit le composant Z de cette structure Vector3D.Gets or sets the Z component of this Vector3D structure.

## Méthodes

 Add(Vector3D, Point3D) Add(Vector3D, Point3D) Add(Vector3D, Point3D) Add(Vector3D, Point3D) Translate le Point3D structure par le Vector3D structurer et retourne le résultat comme un Point3D structure.Translates the specified Point3D structure by the specified Vector3D structure and returns the result as a Point3D structure. Add(Vector3D, Vector3D) Add(Vector3D, Vector3D) Add(Vector3D, Vector3D) Add(Vector3D, Vector3D) Ajoute deux Vector3D structures et retourne le résultat comme un Vector3D structure.Adds two Vector3D structures and returns the result as a Vector3D structure. AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D) Récupère l'angle nécessaire pour faire pivoter la première structure Vector3D spécifiée dans la seconde structure Vector3D spécifiée.Retrieves the angle required to rotate the first specified Vector3D structure into the second specified Vector3D structure. CrossProduct(Vector3D, Vector3D) CrossProduct(Vector3D, Vector3D) CrossProduct(Vector3D, Vector3D) CrossProduct(Vector3D, Vector3D) Calcule le produit croisé de deux Vector3D structures.Calculates the cross product of two Vector3D structures. Divide(Vector3D, Double) Divide(Vector3D, Double) Divide(Vector3D, Double) Divide(Vector3D, Double) Divise spécifié Vector3D structure par la scalaire indiquée et retourne le résultat comme un Vector3D.Divides the specified Vector3D structure by the specified scalar and returns the result as a Vector3D. DotProduct(Vector3D, Vector3D) DotProduct(Vector3D, Vector3D) DotProduct(Vector3D, Vector3D) DotProduct(Vector3D, Vector3D) Calcule le produit scalaire de deux Vector3D structures.Calculates the dot product of two Vector3D structures. Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D) Compare deux Vector3D structures sont égales.Compares two Vector3D structures for equality. Equals(Vector3D) Equals(Vector3D) Equals(Vector3D) Equals(Vector3D) Compare deux Vector3D structures sont égales.Compares two Vector3D structures for equality. Equals(Object) Equals(Object) Equals(Object) Equals(Object) Détermine si l’objet spécifié est un Vector3D structure et si le X, Y, et Z propriétés spécifié Object sont égaux à la X, Yet Zpropriétés de ce Vector3D structure.Determines whether the specified object is a Vector3D structure and whether the X, Y, and Z properties of the specified Object are equal to the X, Y, and Z properties of this Vector3D structure. GetHashCode() GetHashCode() GetHashCode() GetHashCode() Obtient un code de hachage pour ce Vector3D structure.Gets a hash code for this Vector3D structure. Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiplie la scalaire spécifiée par le Vector3D structurer et retourne le résultat comme un Vector3D.Multiplies the specified scalar by the specified Vector3D structure and returns the result as a Vector3D. Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiplie spécifié Vector3D structure par la scalaire indiquée et retourne le résultat comme un Vector3D.Multiplies the specified Vector3D structure by the specified scalar and returns the result as a Vector3D. Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Transforme l’espace de coordonnées de l’objet Vector3D structure à l’aide de la Matrix3D structure.Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure. Negate() Negate() Negate() Negate() Inverse un Vector3D structure.Negates a Vector3D structure. Normalize() Normalize() Normalize() Normalize() Normalise la structure Vector3D spécifiée.Normalizes the specified Vector3D structure. Parse(String) Parse(String) Parse(String) Parse(String) Convertit un String représentation sous forme d’un 3D3-D vecteur en l’équivalent Vector3D structure.Converts a String representation of a 3D3-D vector into the equivalent Vector3D structure. Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D) Soustrait un Point3D structure à partir d’un Vector3D structure.Subtracts a Point3D structure from a Vector3D structure. Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D) Soustrait un Vector3D structure à partir d’un Vector3D structure.Subtracts a Vector3D structure from a Vector3D structure. ToString() ToString() ToString() ToString() Crée un String la représentation sous forme de ce Vector3D structure.Creates a String representation of this Vector3D structure. ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) Crée un String la représentation sous forme de ce Vector3D structure.Creates a String representation of this Vector3D structure.

## Opérateurs

 Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D) Ajoute deux Vector3D structures et retourne le résultat comme un Vector3D structure.Adds two Vector3D structures and returns the result as a Vector3D structure. Addition(Vector3D, Point3D) Addition(Vector3D, Point3D) Addition(Vector3D, Point3D) Addition(Vector3D, Point3D) Translate le Point3D structure par le Vector3D structurer et retourne le résultat comme un Point3D structure.Translates the specified Point3D structure by the specified Vector3D structure and returns the result as a Point3D structure. Division(Vector3D, Double) Division(Vector3D, Double) Division(Vector3D, Double) Division(Vector3D, Double) Divise spécifié Vector3D structure par la scalaire indiquée et retourne le résultat comme un Vector3D.Divides the specified Vector3D structure by the specified scalar and returns the result as a Vector3D. Equality(Vector3D, Vector3D) Equality(Vector3D, Vector3D) Equality(Vector3D, Vector3D) Equality(Vector3D, Vector3D) Compare deux Vector3D structures sont égales.Compares two Vector3D structures for equality. Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D) Convertit un Vector3D structure dans un Point3D structure.Converts a Vector3D structure into a Point3D structure. Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D) Convertit un Vector3D structure dans un Size3D.Converts a Vector3D structure into a Size3D. Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D) Compare deux Vector3D inégalité des structures.Compares two Vector3D structures for inequality. Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Transforme l’espace de coordonnées de l’objet Vector3D structure à l’aide de la Matrix3D structure.Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure. Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiplie la scalaire spécifiée par le Vector3D structurer et retourne le résultat comme un Vector3D.Multiplies the specified scalar by the specified Vector3D structure and returns the result as a Vector3D. Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiply(Vector3D, Double) Multiplie spécifié Vector3D structure par la scalaire indiquée et retourne le résultat comme un Vector3D.Multiplies the specified Vector3D structure by the specified scalar and returns the result as a Vector3D. Subtraction(Vector3D, Vector3D) Subtraction(Vector3D, Vector3D) Subtraction(Vector3D, Vector3D) Subtraction(Vector3D, Vector3D) Soustrait un Vector3D structure à partir d’un Vector3D structure.Subtracts a Vector3D structure from a Vector3D structure. Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D) Soustrait un Point3D structure à partir d’un Vector3D structure.Subtracts a Point3D structure from a Vector3D structure. UnaryNegation(Vector3D) UnaryNegation(Vector3D) UnaryNegation(Vector3D) UnaryNegation(Vector3D) Inverse un Vector3D structure.Negates a Vector3D structure.

## Implémentations d’interfaces explicites

 IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) Ce membre fait partie de la Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure et n’est pas destinée à être directement utilisé par votre code.This member is part of the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly by your code. Pour obtenir une description de ce membre, consultez ToString(String, IFormatProvider).For a description of this member, see ToString(String, IFormatProvider).