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 declares 14 methods for FVector3 objects in TypeScript programs.
Available methods include: constructor, equals, getItem, normalize, one, setItem, toString, unitX, unitY, unitZ, zero.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: x, y, z.
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) | Calls constructor(x, y, z) on this FVector3 instance. |
constructor(vec2: FVector2, z: number) | Calls constructor(vec2, z) on this FVector3 instance. |
constructor(x: number | FVector2, y: number, z: number) | Calls constructor(x, y, z) on this FVector3 instance. |
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 | Calls unitY on this FVector3 instance. |
unitZ() → FVector3 | Calls unitZ on this FVector3 instance. |
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 |