Vector3 Struct
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a vector with three single-precision floating-point values.
public value class Vector3 : IEquatable<System::Numerics::Vector3>, IFormattable
public struct Vector3 : IEquatable<System.Numerics.Vector3>, IFormattable
type Vector3 = struct
interface IFormattable
Public Structure Vector3
Implements IEquatable(Of Vector3), IFormattable
- Inheritance
- Implements
The Vector3 structure provides support for hardware acceleration.
For matrix transformations, the Vector2, Vector3, and Vector4 instances are represented as rows: a vector v is transformed by a matrix M with vM multiplication.
Vector3(Read |
Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 3 elements. |
Vector3(Single, Single, Single) |
Creates a vector whose elements have the specified values. |
Vector3(Single) |
Creates a new Vector3 object whose three elements have the same value. |
Vector3(Vector2, Single) |
Creates a new Vector3 object from the specified Vector2 object and the specified value. |
E |
Gets a vector whose elements are equal to E. |
Epsilon |
Gets a vector whose elements are equal to Epsilon. |
Item[Int32] |
Gets or sets the element at the specified index. |
NaN |
Gets a vector whose elements are equal to NaN. |
Negative |
Gets a vector whose elements are equal to NegativeInfinity. |
Negative |
Gets a vector whose elements are equal to NegativeZero. |
One |
Gets a vector whose 3 elements are equal to one. |
Pi |
Gets a vector whose elements are equal to Pi. |
Positive |
Gets a vector whose elements are equal to PositiveInfinity. |
Tau |
Gets a vector whose elements are equal to Tau. |
UnitX |
Gets the vector (1,0,0). |
UnitY |
Gets the vector (0,1,0). |
UnitZ |
Gets the vector (0,0,1). |
Zero |
Gets a vector whose 3 elements are equal to zero. |
Abs(Vector3) |
Returns a vector whose elements are the absolute values of each of the specified vector's elements. |
Add(Vector3, Vector3) |
Adds two vectors together. |
Clamp(Vector3, Vector3, Vector3) |
Restricts a vector between a minimum and a maximum value. |
Clamp |
Restricts a vector between a minimum and a maximum value using platform specific behavior for |
Copy |
Copies the per-element sign of a vector to the per-element sign of another vector. |
Copy |
Copies the elements of the vector to a specified array starting at a specified index position. |
Copy |
Copies the elements of the vector to a specified array. |
Copy |
Copies the vector to the given Span<T>. The length of the destination span must be at least 3. |
Cos(Vector3) | |
Create(Read |
Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 3 elements. |
Create(Single, Single, Single) |
Creates a vector whose elements have the specified values. |
Create(Single) |
Creates a new Vector3 object whose three elements have the same value. |
Create(Vector2, Single) |
Creates a new Vector3 object from the specified Vector2 object and a Z component. |
Cross(Vector3, Vector3) |
Computes the cross product of two vectors. |
Degrees |
|
Distance(Vector3, Vector3) |
Computes the Euclidean distance between the two given points. |
Distance |
Returns the Euclidean distance squared between two specified points. |
Divide(Vector3, Single) |
Divides the specified vector by a specified scalar value. |
Divide(Vector3, Vector3) |
Divides the first vector by the second. |
Dot(Vector3, Vector3) |
Returns the dot product of two vectors. |
Equals(Object) |
Returns a value that indicates whether this instance and a specified object are equal. |
Equals(Vector3) |
Returns a value that indicates whether this instance and another vector are equal. |
Exp(Vector3) | |
Fused |
|
Get |
Returns the hash code for this instance. |
Hypot(Vector3, Vector3) | |
Length() |
Returns the length of this vector object. |
Length |
Returns the length of the vector squared. |
Lerp(Vector3, Vector3, Single) |
Performs a linear interpolation between two vectors based on the given weighting. |
Lerp(Vector3, Vector3, Vector3) | |
Log(Vector3) | |
Log2(Vector3) | |
Max(Vector3, Vector3) |
Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. |
Max |
Compares two vectors to compute which has the greater magnitude on a per-element basis. |
Max |
Compares two vectors, on a per-element basis, to compute which has the greater magnitude and returning the other value if an input is |
Max |
Compare two vectors to determine which is greater on a per-element basis using platform specific behavior for |
Max |
Compares two vectors, on a per-element basis, to compute which is greater and returning the other value if an element is |
Min(Vector3, Vector3) |
Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. |
Min |
Compares two vectors to compute which has the lesser magnitude on a per-element basis. |
Min |
Compares two vectors, on a per-element basis, to compute which has the lesser magnitude and returning the other value if an input is |
Min |
Compare two vectors to determine which is lesser on a per-element basis using platform specific behavior for |
Min |
Compares two vectors, on a per-element basis, to compute which is lesser and returning the other value if an element is |
Multiply(Single, Vector3) |
Multiplies a scalar value by a specified vector. |
Multiply(Vector3, Single) |
Multiplies a vector by a specified scalar. |
Multiply(Vector3, Vector3) |
Returns a new vector whose values are the product of each pair of elements in two specified vectors. |
Multiply |
|
Negate(Vector3) |
Negates a specified vector. |
Normalize(Vector3) |
Returns a vector with the same direction as the specified vector, but with a length of one. |
Radians |
|
Reflect(Vector3, Vector3) |
Returns the reflection of a vector off a surface that has the specified normal. |
Round(Vector3, Midpoint |
|
Round(Vector3) | |
Sin(Vector3) | |
Sin |
|
Square |
Returns a vector whose elements are the square root of each of a specified vector's elements. |
Subtract(Vector3, Vector3) |
Subtracts the second vector from the first. |
To |
Returns the string representation of the current instance using default formatting. |
To |
Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. |
To |
Returns the string representation of the current instance using the specified format string to format individual elements. |
Transform(Vector3, Matrix4x4) |
Transforms a vector by a specified 4x4 matrix. |
Transform(Vector3, Quaternion) |
Transforms a vector by the specified Quaternion rotation value. |
Transform |
Transforms a vector normal by the given 4x4 matrix. |
Truncate(Vector3) | |
Try |
Attempts to copy the vector to the given Span<T>. The length of the destination span must be at least 3. |
Addition(Vector3, Vector3) |
Adds two vectors together. |
Division(Vector3, Single) |
Divides the specified vector by a specified scalar value. |
Division(Vector3, Vector3) |
Divides the first vector by the second. |
Equality(Vector3, Vector3) |
Returns a value that indicates whether each pair of elements in two specified vectors is equal. |
Inequality(Vector3, Vector3) |
Returns a value that indicates whether two specified vectors are not equal. |
Multiply(Single, Vector3) |
Multiples the scalar value by the specified vector. |
Multiply(Vector3, Single) |
Multiples the specified vector by the specified scalar value. |
Multiply(Vector3, Vector3) |
Returns a new vector whose values are the product of each pair of elements in two specified vectors. |
Subtraction(Vector3, Vector3) |
Subtracts the second vector from the first. |
Unary |
Negates the specified vector. |
As |
Converts a Vector3 to a new Vector4 with the new elements zeroed. |
As |
Converts a Vector3 to a new Vector4 with the new elements undefined. |
As |
Reinterprets a Vector3 as a new Vector128<T>. |
As |
Reinterprets a |
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: