Struct Vector3
Vector3 structure
A vector with three components.
public struct Vector3 : IComparable<Vector3>
Constructors
| Name | Description |
|---|
| Vector3(double) | Initializes a new instance of the Vector3 struct. |
| Vector3(FVector3) | Initializes a new instance of the Vector3 struct. |
| Vector3(Vector4) | Initializes a new instance of the Vector3 struct. |
| Vector3(double, double, double) | Initializes a new instance of the Vector3 struct. |
Properties
| Name | Description |
|---|
| static One { get; } | Gets unit vector (1, 1, 1) |
| static UnitX { get; } | Gets unit vector (1, 0, 0) |
| static UnitY { get; } | Gets unit vector (0, 1, 0) |
| static UnitZ { get; } | Gets unit vector (0, 0, 1) |
| static Zero { get; } | Gets unit vector (0, 0, 0) |
| Item { get; set; } | |
| Length { get; } | Gets the length of this vector. |
| Length2 { get; } | Gets the square of the length. |
Methods
| Name | Description |
|---|
| AngleBetween(Vector3) | Calculate the inner angle between two direction Two direction can be non-normalized vectors |
| AngleBetween(Vector3, Vector3) | Calculate the inner angle between two direction Two direction can be non-normalized vectors |
| CompareTo(Vector3) | Compare current vector to another instance. |
| Cos() | Calculates cosine on each component |
| Cross(Vector3) | Cross product of two vectors |
| Dot(Vector3) | Gets the dot product of two vectors |
| override Equals(object) | Check if two vector3 equals |
| override GetHashCode() | Gets the hash code of Vector3 |
| Normalize() | Normalizes this instance. |
| Set(double, double, double) | Sets the x/y/z component in one call. |
| Sin() | Calculates sine on each component |
| override ToString() | Returns a String that represents the current Vector3. |
| operator + | Operator overloading for + |
| operator / | Operator overloading for / (2 operators) |
| operator == | Equal operator for Vector3 |
| explicit operator | |
| operator != | Not-equal operator for Vector3 |
| operator * | Operator overloading for * (3 operators) |
| operator - | Operator overloading for - (2 operators) |
Fields
| Name | Description |
|---|
| X | The x component. |
| Y | The y component. |
| Z | The z component. |
See Also