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

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)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()FVector3Returns a vector (0,0,0)
one()FVector3Returns a vector (1,1,1)
unitX()FVector3Returns a unit vector (1,0,0)
unitY()FVector3Calls unitY on this FVector3 instance.
unitZ()FVector3Calls unitZ on this FVector3 instance.
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

 English