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
| Name | Type | Access | Description |
|---|---|---|---|
Length2 | double | Read | Gets the squared length of the vector |
Length | double | Read | Gets the Euclidean length of the vector |
Zero | Vector3 | Read | Gets a vector with all components equal to zero |
One | Vector3 | Read | |
UnitX | Vector3 | Read | Gets a unit vector pointing along the X axis |
UnitY | Vector3 | Read | Gets a unit vector pointing along the Y axis |
UnitZ | Vector3 | Read | Gets a unit vector pointing along the Z axis |
Methods
| Signature | Description |
|---|---|
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 |