4 次元ベクトルの表現
この構造体は 4 成分のベクトル(例: メッシュの接線、シェーダーのパラメーター)を表現するために使用します。 他のほとんどのケースでは Vector3 を使用します。
| negativeInfinity | Shorthand for writing Vector4(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity). |
| one | Vector4(1, 1, 1, 1) と同じ意味 |
| positiveInfinity | Shorthand for writing Vector4(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity). |
| zero | Vector4(0, 0, 0, 0) と同じ意味 |
| magnitude | ベクトルの長さ(読み取り専用) |
| normalized | magnitude を 1 としたベクトル(読み取り専用) |
| sqrMagnitude | ベクトルの 2 乗の長さを返します(読み取り専用) |
| this[int] | イデックスによって x、y、z、w にアクセスする。 |
| w | ベクトルの W 成分 |
| x | ベクトルの X 成分 |
| y | ベクトルの Y 成分 |
| z | ベクトルの Z 成分 |
| Vector4 | 与えられた x、y、z、w 成分で新規のベクトルを作成します |
| Equals | Returns true if the given vector is exactly equal to this vector. |
| Set | Set x, y, z and w components of an existing Vector4. |
| ToString | Return the Vector4 formatted as a string. |
| Distance | a と b の間の距離を返します |
| Dot | 2 つのベクトルの内積 |
| Lerp | 直線上にある 2 つのベクトル間を補間します |
| LerpUnclamped | 直線上にある 2 つのベクトル間を補間します |
| Max | 2 つのベクトルで各成分の一番大きな値を使用してベクトルを作成します |
| Min | 2 つのベクトルで各成分の一番小さな値を使用してベクトルを作成します |
| MoveTowards | 現在の位置 current から target に向けて移動します |
| Normalize | magnitude を 1 としたベクトルを作成します |
| Project | ベクトルを別のベクトルに投影します。 |
| Scale | 2 つのベクトルの各成分を乗算します |
| operator - | 別のベクトルと減算を行います |
| operator * | 数字とベクターで乗算します |
| operator / | 数字で Vector を除法します |
| operator + | 2 つのベクトルを加算します |
| operator == | Returns true if two vectors are approximately equal. |
| Vector2 | Converts a Vector4 to a Vector2. |
| Vector3 | Converts a Vector4 to a Vector3. |
| Vector4 | Converts a Vector3 to a Vector4. |
| Vector4 | Converts a Vector2 to a Vector4. |