Partilhar via


Point3D.Subtract Método

Definição

Subtrai uma estrutura Point3D ou uma estrutura Vector3D de uma estrutura Point3D.

Sobrecargas

Subtract(Point3D, Point3D)

Subtrai uma estrutura Point3D de uma estrutura Point3D e retorna o resultado como uma estrutura Vector3D.

Subtract(Point3D, Vector3D)

Subtrai uma estrutura Vector3D de uma estrutura Point3D e retorna o resultado como uma estrutura Point3D.

Subtract(Point3D, Point3D)

Subtrai uma estrutura Point3D de uma estrutura Point3D e retorna o resultado como uma estrutura Vector3D.

public:
 static System::Windows::Media::Media3D::Vector3D Subtract(System::Windows::Media::Media3D::Point3D point1, System::Windows::Media::Media3D::Point3D point2);
public static System.Windows.Media.Media3D.Vector3D Subtract (System.Windows.Media.Media3D.Point3D point1, System.Windows.Media.Media3D.Point3D point2);
static member Subtract : System.Windows.Media.Media3D.Point3D * System.Windows.Media.Media3D.Point3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Function Subtract (point1 As Point3D, point2 As Point3D) As Vector3D

Parâmetros

point1
Point3D

A estrutura Point3D da qual subtrair.

point2
Point3D

A estrutura Point3D para subtrair de point1.

Retornos

Uma estrutura Vector3D que representa a diferença entre point1 e point2.

Exemplos

O exemplo a seguir mostra como subtrair uma Point3D estrutura de uma Point3D estrutura.

// Subtracts a Point3D from a Point3D using the static Subtract method.  
// Returns a Vector3D.

Point3D point1 = new Point3D(10, 5, 1);
Point3D point2 = new Point3D(15, 40, 60);
Vector3D vectorResult = new Vector3D();

vectorResult = Point3D.Subtract(point1, point2);
// vectorResult is equal to (-5, -35, -59)

// Displaying Results
syntaxString = "vectorResult = Point3D.Subtract(point1, point2);";
resultType = "Vector3D";
operationString = "Subtracting a Point3D from a Point3D";
ShowResults(vectorResult.ToString(), syntaxString, resultType, operationString);
' Subtracts a Point3D from a Point3D using the static Subtract method.  
' Returns a Vector3D.

Dim point1 As New Point3D(10, 5, 1)
Dim point2 As New Point3D(15, 40, 60)
Dim vectorResult As New Vector3D()

vectorResult = Point3D.Subtract(point1, point2)
' vectorResult is equal to (-5, -35, -59)

' Displaying Results
syntaxString = "vectorResult = Point3D.Subtract(point1, point2)"
resultType = "Vector3D"
operationString = "Subtracting a Point3D from a Point3D"
ShowResults(vectorResult.ToString(), syntaxString, resultType, operationString)

Confira também

Aplica-se a

Subtract(Point3D, Vector3D)

Subtrai uma estrutura Vector3D de uma estrutura Point3D e retorna o resultado como uma estrutura Point3D.

public:
 static System::Windows::Media::Media3D::Point3D Subtract(System::Windows::Media::Media3D::Point3D point, System::Windows::Media::Media3D::Vector3D vector);
public static System.Windows.Media.Media3D.Point3D Subtract (System.Windows.Media.Media3D.Point3D point, System.Windows.Media.Media3D.Vector3D vector);
static member Subtract : System.Windows.Media.Media3D.Point3D * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Point3D
Public Shared Function Subtract (point As Point3D, vector As Vector3D) As Point3D

Parâmetros

point
Point3D

A estrutura Point3D da qual subtrair vector.

vector
Vector3D

A estrutura Vector3D para subtrair de point.

Retornos

A diferença entre point e vector.

Exemplos

O exemplo a seguir mostra como subtrair uma Vector3D estrutura de uma Point3D estrutura.

// Subtracts a Vector3D from a Point3D using the static Subtract method. 
// Returns a Point3D.

Point3D point1 = new Point3D(10, 5, 1);
Vector3D vector1 = new Vector3D(20, 30, 40);
Point3D pointResult = new Point3D();

pointResult = Point3D.Subtract(point1, vector1);
// pointResult is equal to (-10, -25, -39)

// Displaying Results
syntaxString = "pointResult = Point3D.Subtract(point1, vector1);";
resultType = "Point3D";
operationString = "Subtracting a Vector3D from a Point3D";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Subtracts a Vector3D from a Point3D using the static Subtract method. 
' Returns a Point3D.

Dim point1 As New Point3D(10, 5, 1)
Dim vector1 As New Vector3D(20, 30, 40)
Dim pointResult As New Point3D()

pointResult = Point3D.Subtract(point1, vector1)
' pointResult is equal to (-10, -25, -39)

' Displaying Results
syntaxString = "pointResult = Point3D.Subtract(point1, vector1)"
resultType = "Point3D"
operationString = "Subtracting a Vector3D from a Point3D"
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)

Confira também

Aplica-se a