Vector4
Overview
Vector4 is a class in Aspose.3d for Typescript.
Inherits from: Vector4.
Vector4 implements a 4‑D vector with constructors for individual components or from a Vector3 plus w, and supports component access, mutation, string conversion, and equality testing.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
x | number | Read | Holds the vector’s first (X) component |
y | number | Read | Holds the vector’s second (Y) component |
z | number | Read | Holds the vector’s third (Z) component |
w | number | Read | Holds the vector’s fourth (W) component |
Methods
| Signature | Description |
|---|---|
constructor() | Creates a vector using a mixed argument where x may be a Vector2, Vector3, or number, followed by y, z, w numbers |
constructor(x: number, y: number, z: number, w: number) | |
constructor(vec3: FVector3, w: number) | |
constructor(vec: FVector2, w: number) | |
constructor(x: FVector2 | FVector3 | number, y: number, z: number, w: number) | |
set(newX: number, newY: number, newZ: number, newW: number) | Assigns new values to x, y, z, w components |
getItem(key: number) → number | |
setItem(key: number, value: number) | Sets the component at the given index (0‑3) to the provided value |
toString() → string | |
equals(other: Vector4) → boolean |