Vector3

Overview

Vector3 is a struct in Aspose.3D FOSS for .NET. Inherits from: IComparable<Vector3>, IEquatable<Vector3>.

Vector3.Vector3 creates a vector with given x, y, z components.

Properties

NameTypeAccessDescription
Length2doubleReadGets the squared length of the vector
LengthdoubleReadGets the Euclidean length of the vector
ZeroVector3ReadGets a vector with all components equal to zero
OneVector3Read
UnitXVector3ReadGets a unit vector pointing along the X axis
UnitYVector3ReadGets a unit vector pointing along the Y axis
UnitZVector3ReadGets a unit vector pointing along the Z axis

Methods

SignatureDescription
Vector3(x: double, y: double, z: double)Creates a vector with all components set to the same double value
Vector3(vec: FVector3)
Vector3(v: double)
Vector3(vec4: Vector4)
Parse(input: string)Converts a string representation into a Vector3
Equals(obj: object?)Determines whether the given object is equal to this vector
Equals(rhs: Vector3)
GetHashCode()
Dot(rhs: Vector3)Returns the dot product of this vector with another
Normalize()Scales the vector to unit length
Sin()Returns a vector whose components are the sine of this vector’s components
Cos()
Cross(rhs: Vector3)
Set(newX: double, newY: double, newZ: double)Assigns new x, y, z values to the vector
ToString()
AngleBetween(dir: Vector3, up: Vector3)Computes the signed angle between this vector and dir using up as reference
AngleBetween(dir: Vector3)
CompareTo(other: Vector3)Compares this vector to another for sorting