Vector3

Vector3 structure

A vector with three components.

public struct Vector3 : IComparable<Vector3>

Constructors

Name Description
Vector3(Color) Initializes a new instance of the Vector3 struct.
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
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 /
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
static readonly Origin Gets the origin position.
static readonly UnitScale Gets the unit scale vector.
static readonly XAxis Gets the X axis.
static readonly YAxis Gets the Y axis.
static readonly ZAxis Gets the Z axis.
x The x component.
y The y component.
z The z component.

See Also