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

NameTypeAccessDescription
xnumberReadHolds the vector’s first (X) component
ynumberReadHolds the vector’s second (Y) component
znumberReadHolds the vector’s third (Z) component
wnumberReadHolds the vector’s fourth (W) component

Methods

SignatureDescription
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