Vector3D Vector3D Vector3D Vector3D Struct

定義

3-D 空間における変位を表します。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
継承
属性
実装

この例では、減算Vector3Dオーバー ロードされた減算を使用する構造体 (-) 演算子とVector3D静的Subtractメソッド。This example shows how to subtract Vector3D structures using the overloaded subtraction (-) operator and the Vector3D static Subtract method.

次のコードを使用する方法を示しています、Vector3D減算メソッド。The following code shows how to use the Vector3D subtraction methods. まず、Vector3D構造がインスタンス化します。First, the Vector3D structures are instantiated. Vector3D 、オーバー ロードを使用して構造体が差し引かれます (-) 演算子、およびそれらからは、静的 using 減算Subtractメソッド。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)

注釈

XAML 属性の使用方法XAML Attribute Usage

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

XAML 値XAML Values

xx
この Vector3D 構造体の X コンポーネント。The X component of this Vector3D structure.

yy
この Vector3D 構造体の Y コンポーネント。The Y component of this Vector3D structure.

zz
この Vector3D 構造体の Z コンポーネント。The Z component of this Vector3D structure.

コンストラクター

Vector3D(Double, Double, Double) Vector3D(Double, Double, Double) Vector3D(Double, Double, Double) Vector3D(Double, Double, Double)

新しいインスタンスを初期化するVector3D構造体。Initializes a new instance of a Vector3D structure.

プロパティ

Length Length Length Length

この長さを取得Vector3D構造体。Gets the length of this Vector3D structure.

LengthSquared LengthSquared LengthSquared LengthSquared

長さの四角形を取得Vector3D構造体。Gets the square of the length of this Vector3D structure.

X X X X

この Vector3D 構造体の X コンポーネントを取得または設定します。Gets or sets the X component of this Vector3D structure.

Y Y Y Y

この Vector3D 構造体の Y コンポーネントを取得または設定します。Gets or sets the Y component of this Vector3D structure.

Z Z Z Z

この Vector3D 構造体の Z コンポーネントを取得または設定します。Gets or sets the Z component of this Vector3D structure.

メソッド

Add(Vector3D, Point3D) Add(Vector3D, Point3D) Add(Vector3D, Point3D) Add(Vector3D, Point3D)

指定した変換Point3D、指定した構造Vector3D構造体し、結果として返します、Point3D構造体。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)

2 つ追加しますVector3D構造体し、その結果、Vector3D構造体。Adds two Vector3D structures and returns the result as a Vector3D structure.

AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D) AngleBetween(Vector3D, Vector3D)

最初の回転に必要な角度の指定を取得しますVector3D構造を 2 番目に指定されたVector3D構造体。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)

2 つのクロス積を計算Vector3D構造体。Calculates the cross product of two Vector3D structures.

Divide(Vector3D, Double) Divide(Vector3D, Double) Divide(Vector3D, Double) Divide(Vector3D, Double)

指定されたVector3D指定したスカラー構造体として結果を返します、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)

2 つのドット積を計算Vector3D構造体。Calculates the dot product of two Vector3D structures.

Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D) Equals(Vector3D, Vector3D)

2 つVector3D構造体が等しいかどうか。Compares two Vector3D structures for equality.

Equals(Vector3D) Equals(Vector3D) Equals(Vector3D) Equals(Vector3D)

2 つVector3D構造体が等しいかどうか。Compares two Vector3D structures for equality.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

指定したオブジェクトがあるかどうかを判断します、Vector3D構造体かどうかと、 XYZプロパティの指定したObjectと等しい、 XY、およびZの各プロパティVector3D構造体。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()

このハッシュ コードを取得します。Vector3D構造体。Gets a hash code for this Vector3D structure.

Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D) Multiply(Double, Vector3D)

指定した指定したスカラーを乗算Vector3D構造体し、その結果、 Vector3DMultiplies 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)

指定された乗算Vector3D指定したスカラー構造体として結果を返します、 Vector3DMultiplies 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)

指定した座標空間を変換Vector3D構造を使用して、指定Matrix3D構造体。Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure.

Negate() Negate() Negate() Negate()

否定、Vector3D構造体。Negates a Vector3D structure.

Normalize() Normalize() Normalize() Normalize()

指定した Vector3D 構造体を正規化します。Normalizes the specified Vector3D structure.

Parse(String) Parse(String) Parse(String) Parse(String)

変換をStringの表現、3-D3-Dベクトルを等価Vector3D構造体。Converts a String representation of a 3-D3-D vector into the equivalent Vector3D structure.

Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D) Subtract(Vector3D, Point3D)

減算、Point3Dから構造体、Vector3D構造体。Subtracts a Point3D structure from a Vector3D structure.

Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D) Subtract(Vector3D, Vector3D)

減算、Vector3Dから構造体、Vector3D構造体。Subtracts a Vector3D structure from a Vector3D structure.

ToString() ToString() ToString() ToString()

作成、Stringこの表現Vector3D構造体。Creates a String representation of this Vector3D structure.

ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

作成、Stringこの表現Vector3D構造体。Creates a String representation of this Vector3D structure.

演算子

Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D) Addition(Vector3D, Vector3D)

2 つ追加しますVector3D構造体し、その結果、Vector3D構造体。Adds two Vector3D structures and returns the result as a Vector3D structure.

Addition(Vector3D, Point3D) Addition(Vector3D, Point3D) Addition(Vector3D, Point3D) Addition(Vector3D, Point3D)

指定した変換Point3D、指定した構造Vector3D構造体し、結果として返します、Point3D構造体。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)

指定されたVector3D指定したスカラー構造体として結果を返します、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)

2 つVector3D構造体が等しいかどうか。Compares two Vector3D structures for equality.

Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D) Explicit(Vector3D to Point3D)

変換をVector3Dに構造体、Point3D構造体。Converts a Vector3D structure into a Point3D structure.

Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D) Explicit(Vector3D to Size3D)

変換をVector3Dに構造体、Size3Dします。Converts a Vector3D structure into a Size3D.

Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D) Inequality(Vector3D, Vector3D)

2 つVector3D構造体が等しくないです。Compares two Vector3D structures for inequality.

Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D) Multiply(Vector3D, Matrix3D)

指定した座標空間を変換Vector3D構造を使用して、指定Matrix3D構造体。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)

指定した指定したスカラーを乗算Vector3D構造体し、その結果、 Vector3DMultiplies 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)

指定された乗算Vector3D指定したスカラー構造体として結果を返します、 Vector3DMultiplies 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)

減算、Vector3Dから構造体、Vector3D構造体。Subtracts a Vector3D structure from a Vector3D structure.

Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D) Subtraction(Vector3D, Point3D)

減算、Point3Dから構造体、Vector3D構造体。Subtracts a Point3D structure from a Vector3D structure.

UnaryNegation(Vector3D) UnaryNegation(Vector3D) UnaryNegation(Vector3D) UnaryNegation(Vector3D)

否定、Vector3D構造体。Negates a Vector3D structure.

明示的なインターフェイスの実装

IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

このメンバーの一部である、Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)インフラストラクチャと、コードで直接使用するものではありません。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. このメンバーの詳細については、「ToString(String, IFormatProvider)」をご覧ください。For a description of this member, see ToString(String, IFormatProvider).

適用対象