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

NameTypeAccessDescription
xnumberRead/WriteGets the x.
ynumberRead/WriteGets the y.
znumberRead/WriteGets the z.

Methods

SignatureDescription
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()FVector3Returns a vector (0,0,0)
one()FVector3Returns a vector (1,1,1)
unitX()FVector3Returns a unit vector (1,0,0)
unitY()FVector3
unitZ()FVector3
normalize()FVector3Returns a vector with length 1 pointing in the same direction
getItem(key: number)numberReturns the component at index 0=x,1=y,2=z
setItem(key: number, value: number)Sets the item value.
toString()stringReturns a string representation of the vector
equals(other: FVector3)booleanChecks if both vectors have identical components

See Also