FVector3
Overview
FVector3 is a class in Aspose.3D FOSS for Typescript.
FVector3.constructor creates a vector with default components (0,0,0).
This class provides 11 methods for working with FVector3 objects in Typescript programs.
Available methods include: constructor, equals, getItem, normalize, one, setItem, toString, unitX, unitY, unitZ, zero.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: x, y, z.
Description
FVector3 is a class in the Aspose.3D FOSS library for TypeScript that exposes 10 methods and 3 properties for programmatic use.
Core capabilities include: number; number; number. These operations enable developers to integrate fvector3 functionality directly into TypeScript applications.
The class offers 4 constructor overloads, allowing flexible initialization depending on the calling context.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
x | number | Read/Write | Gets the x. |
y | number | Read/Write | Gets the y. |
z | number | Read/Write | Gets the z. |
Methods
| Signature | Description |
|---|---|
constructor() | Creates a vector from either x value or a 2D vector and y, z |
constructor(x: number, y: number, z: number) | |
constructor(vec2: FVector2, z: number) | |
constructor(x: number | FVector2, y: number, z: number) | |
zero() → FVector3 | Returns a vector (0,0,0) |
one() → FVector3 | Returns a vector (1,1,1) |
unitX() → FVector3 | Returns a unit vector (1,0,0) |
unitY() → FVector3 | |
unitZ() → FVector3 | |
normalize() → FVector3 | Returns a vector with length 1 pointing in the same direction |
getItem(key: number) → number | Returns the component at index 0=x,1=y,2=z |
setItem(key: number, value: number) | Sets the item value. |
toString() → string | Returns a string representation of the vector |
equals(other: FVector3) → boolean | Checks if both vectors have identical components |