Skip to content

@orillusion/core


Class: Navi3DPointFat

Defined in: src/math/navigation/Navi3DPointFat.ts:4

Vector 3D

Extends

Constructors

Constructor

new Navi3DPointFat(_point, _edge): Navi3DPointFat

Defined in: src/math/navigation/Navi3DPointFat.ts:11

Parameters

_point

Navi3DPoint

_edge

Navi3DEdge

Returns

Navi3DPointFat

Overrides

Navi3DPoint.constructor

Properties

MAX

readonly static MAX: Vector3

Defined in: src/math/Vector3.ts:11

Vector maximum

Inherited from

Navi3DPoint.MAX


MIN

readonly static MIN: Vector3

Defined in: src/math/Vector3.ts:16

Vector minimum

Inherited from

Navi3DPoint.MIN


SAFE_MAX

readonly static SAFE_MAX: Vector3

Defined in: src/math/Vector3.ts:21

Vector maximum integer value

Inherited from

Navi3DPoint.SAFE_MAX


SAFE_MIN

readonly static SAFE_MIN: Vector3

Defined in: src/math/Vector3.ts:26

Vector minimum integer value

Inherited from

Navi3DPoint.SAFE_MIN


X_AXIS

readonly static X_AXIS: Vector3

Defined in: src/math/Vector3.ts:31

X axis positive axis coordinate (1, 0, 0).

Inherited from

Navi3DPoint.X_AXIS


neg_X_AXIS

readonly static neg_X_AXIS: Vector3

Defined in: src/math/Vector3.ts:36

The X-axis is negative (-1, 0, 0).

Inherited from

Navi3DPoint.neg_X_AXIS


Y_AXIS

readonly static Y_AXIS: Vector3

Defined in: src/math/Vector3.ts:41

The y axis defined as a Vector3 object with coordinates (0,1,0).

Inherited from

Navi3DPoint.Y_AXIS


Z_AXIS

readonly static Z_AXIS: Vector3

Defined in: src/math/Vector3.ts:46

The z axis defined as a Vector3 object with coordinates (0,0,1).

Inherited from

Navi3DPoint.Z_AXIS


x

x: number = 0

Defined in: src/math/Vector3.ts:148

The first element of a Vector3 object, such as the x coordinate of a point in the three-dimensional space. The default value is 0.

Inherited from

Navi3DPoint.x


y

y: number = 0

Defined in: src/math/Vector3.ts:154

The second element of a Vector3 object, such as the y coordinate of a point in the three-dimensional space. The default value is 0.

Inherited from

Navi3DPoint.y


z

z: number = 0

Defined in: src/math/Vector3.ts:160

The third element of a Vector3 object, such as the y coordinate of a point in the three-dimensional space. The default value is 0.

Inherited from

Navi3DPoint.z


w

w: number = 1

Defined in: src/math/Vector3.ts:167

The z component of the vector, A three-dimensional position or projection that can be used as a perspective projection We can also do w in the quaternion

Inherited from

Navi3DPoint.w


CALC_VECTOR3D1

static CALC_VECTOR3D1: Vector3

Defined in: src/math/navigation/Navi3DPoint.ts:6

Inherited from

Navi3DPoint.CALC_VECTOR3D1


CALC_VECTOR3D2

static CALC_VECTOR3D2: Vector3

Defined in: src/math/navigation/Navi3DPoint.ts:8

Inherited from

Navi3DPoint.CALC_VECTOR3D2


CALC_VECTOR3D3

static CALC_VECTOR3D3: Vector3

Defined in: src/math/navigation/Navi3DPoint.ts:10

Inherited from

Navi3DPoint.CALC_VECTOR3D3


CALC_VECTOR3D4

static CALC_VECTOR3D4: Vector3

Defined in: src/math/navigation/Navi3DPoint.ts:12

Inherited from

Navi3DPoint.CALC_VECTOR3D4


CALC_VECTOR3D5

static CALC_VECTOR3D5: Vector3

Defined in: src/math/navigation/Navi3DPoint.ts:14

Inherited from

Navi3DPoint.CALC_VECTOR3D5


radius

radius: number = 0

Defined in: src/math/navigation/Navi3DPointFat.ts:9

Accessors

ZERO

Get Signature

get static ZERO(): Vector3

Defined in: src/math/Vector3.ts:91

Returns a new vector with zero x, y, and z components

Returns

Vector3

Inherited from

Navi3DPoint.ZERO


ONE

Get Signature

get static ONE(): Vector3

Defined in: src/math/Vector3.ts:98

Returns a new vector whose x, y, and z components are all 1

Returns

Vector3

Inherited from

Navi3DPoint.ONE


LEFT

Get Signature

get static LEFT(): Vector3

Defined in: src/math/Vector3.ts:105

Returns a new vector pointing to the left, x is -1, y is 0, and z is 0

Returns

Vector3

Inherited from

Navi3DPoint.LEFT


Get Signature

get static RIGHT(): Vector3

Defined in: src/math/Vector3.ts:112

Returns a new vector pointing in the right direction, where x is 1, y is 0, and z is 0

Returns

Vector3

Inherited from

Navi3DPoint.RIGHT


UP

Get Signature

get static UP(): Vector3

Defined in: src/math/Vector3.ts:119

Returns a new vector pointing upwards, that is, x equals 0, y equals 1, and z equals 0

Returns

Vector3

Inherited from

Navi3DPoint.UP


DOWN

Get Signature

get static DOWN(): Vector3

Defined in: src/math/Vector3.ts:126

Returns a new vector pointing down, where x is 0, y is -1, and z is 0

Returns

Vector3

Inherited from

Navi3DPoint.DOWN


BACK

Get Signature

get static BACK(): Vector3

Defined in: src/math/Vector3.ts:133

Returns a new backward vector, x equals 0, y equals 0, and z equals negative 1

Returns

Vector3

Inherited from

Navi3DPoint.BACK


FORWARD

Get Signature

get static FORWARD(): Vector3

Defined in: src/math/Vector3.ts:140

Returns a new forward-pointing vector, that is, x is 0, y is 0, and z is 1

Returns

Vector3

Inherited from

Navi3DPoint.FORWARD


a

Get Signature

get a(): number

Defined in: src/math/Vector3.ts:233

get the w component

Returns

number

value of w

Set Signature

set a(value): void

Defined in: src/math/Vector3.ts:201

Set w component

Parameters
value

number

Returns

void

Inherited from

Navi3DPoint.a


r

Get Signature

get r(): number

Defined in: src/math/Vector3.ts:241

get the x component

Returns

number

value of x

Set Signature

set r(value): void

Defined in: src/math/Vector3.ts:209

Set x component

Parameters
value

number

Returns

void

Inherited from

Navi3DPoint.r


g

Get Signature

get g(): number

Defined in: src/math/Vector3.ts:249

get the y component

Returns

number

value of y

Set Signature

set g(value): void

Defined in: src/math/Vector3.ts:217

Set the y component

Parameters
value

number

Returns

void

Inherited from

Navi3DPoint.g


b

Get Signature

get b(): number

Defined in: src/math/Vector3.ts:257

get the z component

Returns

number

value of z

Set Signature

set b(value): void

Defined in: src/math/Vector3.ts:225

Set z component

Parameters
value

number

Returns

void

Inherited from

Navi3DPoint.b


length

Get Signature

get length(): number

Defined in: src/math/Vector3.ts:264

The length of the vector, the distance from the origin (0, 0, 0) to (x, y, z)

Returns

number

Inherited from

Navi3DPoint.length


lengthSquared

Get Signature

get lengthSquared(): number

Defined in: src/math/Vector3.ts:272

You get the square of the length of the vector

Returns

number

Inherited from

Navi3DPoint.lengthSquared


position

Get Signature

get position(): this

Defined in: src/math/Vector3.ts:279

Get the current vector

Returns

this

Inherited from

Navi3DPoint.position


id

Get Signature

get id(): number

Defined in: src/math/navigation/Navi3DPoint.ts:23

Returns

number

Inherited from

Navi3DPoint.id


ownerPoint

Get Signature

get ownerPoint(): Navi3DPoint

Defined in: src/math/navigation/Navi3DPointFat.ts:17

Returns

Navi3DPoint


ownerEdge

Get Signature

get ownerEdge(): Navi3DEdge

Defined in: src/math/navigation/Navi3DPointFat.ts:21

Returns

Navi3DEdge

Methods

getTowPointbyDir()

static getTowPointbyDir(dir, tp1, tp2, width, aix): void

Defined in: src/math/Vector3.ts:290

Obtain a vertical line segment with width through an orientation

Parameters

dir

Vector3

tp1

Vector3

tp2

Vector3

width

number

aix

Vector3

Returns

void

Inherited from

Navi3DPoint.getTowPointbyDir


pointToLine()

static pointToLine(point1, point2, position): number

Defined in: src/math/Vector3.ts:319

Calculate the distance from the point to the line

Parameters

point1

Vector3

Starting point of line segment

point2

Vector3

End point of line segment

position

Vector3

Point position

Returns

number

Distance from a point to a line segment

Inherited from

Navi3DPoint.pointToLine


dot()

static dot(a, b): number

Defined in: src/math/Vector3.ts:353

Take the dot product of two vectors.

Parameters

a

Vector3

Vector a

b

Vector3

Vector b

Returns

number

Inherited from

Navi3DPoint.dot


getPoints()

static getPoints(total, randSeed): any[]

Defined in: src/math/Vector3.ts:357

Parameters

total

number

randSeed

number

Returns

any[]

Inherited from

Navi3DPoint.getPoints


getPointNumbers()

static getPointNumbers(total, randSeed): any[]

Defined in: src/math/Vector3.ts:366

Parameters

total

number

randSeed

number

Returns

any[]

Inherited from

Navi3DPoint.getPointNumbers


getAngle()

static getAngle(from, to): number

Defined in: src/math/Vector3.ts:380

Returns the Angle, in degrees, between the source vector and the target vector.

Parameters

from

Vector3

source vector.

to

Vector3

target vector.

Returns

number

Inherited from

Navi3DPoint.getAngle


sqrMagnitude()

static sqrMagnitude(arg0): number

Defined in: src/math/Vector3.ts:385

Parameters

arg0

Vector3

Returns

number

Inherited from

Navi3DPoint.sqrMagnitude


getZYAngle()

static getZYAngle(zd, yd): number

Defined in: src/math/Vector3.ts:389

Parameters

zd

Vector3

yd

Vector3

Returns

number

Inherited from

Navi3DPoint.getZYAngle


sub()

static sub(a, b, target?): Vector3

Defined in: src/math/Vector3.ts:399

Subtract two vectors

Parameters

a

Vector3

Vector a

b

Vector3

Vector b

target?

Vector3 = null

output vector

Returns

Vector3

Inherited from

Navi3DPoint.sub


add()

static add(a, b, target?): Vector3

Defined in: src/math/Vector3.ts:415

Add two vectors

Parameters

a

Vector3

Vector a

b

Vector3

Vector b

target?

Vector3 = null

output vector

Returns

Vector3

Inherited from

Navi3DPoint.add


multiply()

static multiply(a, b, result?): Vector3

Defined in: src/math/Vector3.ts:426

Component-wise multiply two vectors

Parameters

a

Vector3

b

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.multiply


divide()

static divide(a, b, result?): Vector3

Defined in: src/math/Vector3.ts:437

Component-wise divide two vectors

Parameters

a

Vector3

b

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.divide


multiplyScalar()

static multiplyScalar(a, s, result?): Vector3

Defined in: src/math/Vector3.ts:448

Multiply a vector by a scalar

Parameters

a

Vector3

s

number

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.multiplyScalar


addScaledVector()

static addScaledVector(a, b, s, result?): Vector3

Defined in: src/math/Vector3.ts:459

result = a + b * s

Parameters

a

Vector3

b

Vector3

s

number

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.addScaledVector


cross()

static cross(a, b, result?): Vector3

Defined in: src/math/Vector3.ts:470

Cross product of two vectors

Parameters

a

Vector3

b

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.cross


negate()

static negate(a, result?): Vector3

Defined in: src/math/Vector3.ts:484

Negate a vector

Parameters

a

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.negate


min()

static min(a, b, result?): Vector3

Defined in: src/math/Vector3.ts:495

Component-wise minimum of two vectors

Parameters

a

Vector3

b

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.min


max()

static max(a, b, result?): Vector3

Defined in: src/math/Vector3.ts:506

Component-wise maximum of two vectors

Parameters

a

Vector3

b

Vector3

result?

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.max


distance()

static distance(pt1, pt2): number

Defined in: src/math/Vector3.ts:549

Calculate the distance between two vectors

Parameters

pt1

Vector3

Vector 1

pt2

Vector3

Vector 2

Returns

number

number The distance between two vectors

Inherited from

Navi3DPoint.distance


squareDistance()

static squareDistance(pt1, pt2): number

Defined in: src/math/Vector3.ts:562

Calculate the square distance between two vectors

Parameters

pt1

Vector3

Vector 1

pt2

Vector3

Vector 2

Returns

number

number The square distance between two vectors

Inherited from

Navi3DPoint.squareDistance


distanceXZ()

static distanceXZ(pt1, pt2): number

Defined in: src/math/Vector3.ts:574

Calculate the distance between two vectors XZ axes

Parameters

pt1

Vector3

Vector 1

pt2

Vector3

Vector 2

Returns

number

number The distance between two vectors

Inherited from

Navi3DPoint.distanceXZ


set()

set(x, y, z, w?): Navi3DPointFat

Defined in: src/math/Vector3.ts:589

Sets the current vector x, y, z, and w components

Parameters

x

number

y

number

z

number

w?

number = 1

Returns

Navi3DPointFat

Inherited from

Navi3DPoint.set


add()

add(a): this

Defined in: src/math/Vector3.ts:600

Adds vector a to this vector (component-wise on xyz). Mutates and returns this.

Parameters

a

Vector3

Returns

this

Inherited from

Navi3DPoint.add


addVectors()

addVectors(a, b): this

Defined in: src/math/Vector3.ts:605

Set this = a + b. Ternary mutator form.

Parameters

a

Vector3

b

Vector3

Returns

this

Inherited from

Navi3DPoint.addVectors


subVectors()

subVectors(a, b): this

Defined in: src/math/Vector3.ts:609

Parameters

a

Vector3

b

Vector3

Returns

this

Inherited from

Navi3DPoint.subVectors


multiplyVectors()

multiplyVectors(a, b): this

Defined in: src/math/Vector3.ts:614

Set this = a * b component-wise.

Parameters

a

Vector3

b

Vector3

Returns

this

Inherited from

Navi3DPoint.multiplyVectors


addScalar()

addScalar(scalar): Vector3

Defined in: src/math/Vector3.ts:618

Parameters

scalar

number

Returns

Vector3

Inherited from

Navi3DPoint.addScalar


subScalar()

subScalar(scalar): Vector3

Defined in: src/math/Vector3.ts:625

Parameters

scalar

number

Returns

Vector3

Inherited from

Navi3DPoint.subScalar


min()

min(v): this

Defined in: src/math/Vector3.ts:635

Component-wise minimum with v. Mutates and returns this.

Parameters

v

Vector3

Returns

this

Inherited from

Navi3DPoint.min


max()

max(v): this

Defined in: src/math/Vector3.ts:642

Component-wise maximum with v. Mutates and returns this.

Parameters

v

Vector3

Returns

this

Inherited from

Navi3DPoint.max


distanceToSquared()

distanceToSquared(v): number

Defined in: src/math/Vector3.ts:646

Parameters

v

Vector3

Returns

number

Inherited from

Navi3DPoint.distanceToSquared


addXYZW()

addXYZW(x, y, z, w): this

Defined in: src/math/Vector3.ts:656

Adds (x, y, z, w) to each component. Mutates and returns this.

Parameters

x

number

y

number

z

number

w

number

Returns

this

Inherited from

Navi3DPoint.addXYZW


clone()

clone(): Vector3

Defined in: src/math/Vector3.ts:667

Clone a vector with the same components as the current vector

Returns

Vector3

Inherited from

Navi3DPoint.clone


decrementBy()

decrementBy(a): this

Defined in: src/math/Vector3.ts:681

Subtract two vectors and assign the result to yourself

Parameters

a

Vector3

Minus vector

Returns

this

Inherited from

Navi3DPoint.decrementBy


dotProduct()

dotProduct(a): number

Defined in: src/math/Vector3.ts:694

Calculate the dot product of two vectors and return the Angle relationship between the two vectors

Parameters

a

Vector3

The vector that you need to compute

Returns

number

number Returns the Angle relationship between two vectors

Inherited from

Navi3DPoint.dotProduct


equals()

equals(toCompare, allFour?): boolean

Defined in: src/math/Vector3.ts:716

Find whether the values of two vectors are identical

Parameters

toCompare

Vector3

The vector to compare

allFour?

boolean = false

The default parameter is 1, whether to compare the w component

Returns

boolean

A value of true if the specified Vector3 object is equal to the current Vector3 object; false if it is not equal.

Inherited from

Navi3DPoint.equals


incrementBy()

incrementBy(a): this

Defined in: src/math/Vector3.ts:736

The current vector plus is equal to the vector, plus just the x, y, and z components

Parameters

a

Vector3

vector

Returns

this

Inherited from

Navi3DPoint.incrementBy


divide()

divide(v): this

Defined in: src/math/Vector3.ts:747

Component-wise divides this vector by v. Mutates and returns this.

Parameters

v

Vector3

Returns

this

Inherited from

Navi3DPoint.divide


negate()

negate(): Navi3DPointFat

Defined in: src/math/Vector3.ts:758

Sets the current Vector3 object to its inverse. The inverse object is also considered the opposite of the original object. The value of the x, y, and z properties of the current Vector3 object is changed to -x, -y, and -z.

Returns

Navi3DPointFat

Inherited from

Navi3DPoint.negate


normalize()

normalize(thickness?): Vector3

Defined in: src/math/Vector3.ts:773

Scales the line segment between(0,0) and the current point to a set length.

Parameters

thickness?

number = 1

The scaling value. For example, if the current Vector3 object is (0,3,4), and you normalize it to 1, the point returned is at(0,0.6,0.8).

Returns

Vector3

Inherited from

Navi3DPoint.normalize


applyQuaternion()

applyQuaternion(q): Navi3DPointFat

Defined in: src/math/Vector3.ts:790

Apply the rotation quaternion

Parameters

q

any

quaternion

Returns

Navi3DPointFat

Inherited from

Navi3DPoint.applyQuaternion


applyMatrix4()

applyMatrix4(m): this

Defined in: src/math/Vector3.ts:815

Parameters

m

any

Returns

this

Inherited from

Navi3DPoint.applyMatrix4


setTo()

setTo(xa, ya, za, wa?): void

Defined in: src/math/Vector3.ts:827

Parameters

xa

number

The first element, such as the x coordinate.

ya

number

The second element, such as the y coordinate.

za

number

The third element, such as the z coordinate.

wa?

number = 1

Returns

void

Language

en_US Sets the members of Vector3 to the specified values

Inherited from

Navi3DPoint.setTo


copy()

copy(src): this

Defined in: src/math/Vector3.ts:839

Copy the components of the source vector to this vector

Parameters

src

Vector3

Source vector

Returns

this

Inherited from

Navi3DPoint.copy


sub()

sub(a): this

Defined in: src/math/Vector3.ts:858

Parameters

a

Vector3

The Vector3 object to be subtracted from the current Vector3 object.

Returns

this

A new Vector3 object that is the difference between the current Vector3 and the specified Vector3 object.

Language

en_US Subtracts the value of the x, y, and z elements of the current Vector3 object from the values of the x, y, and z elements of another Vector3 object. Returns a new Vector3.

Inherited from

Navi3DPoint.sub


multiply()

multiply(other): this

Defined in: src/math/Vector3.ts:865

Component-wise multiplies this vector by other. Mutates and returns this.

Parameters

other

Vector3

Returns

this

Inherited from

Navi3DPoint.multiply


lerp()

lerp(v0, v1, t): void

Defined in: src/math/Vector3.ts:875

Computes the linear interpolation between two Vector3, and the result is the current object

Parameters

v0

Vector3

Vector 1

v1

Vector3

Vector 2

t

number

Interpolation factor

Returns

void

Inherited from

Navi3DPoint.lerp


clamp()

clamp(min, max): Vector3

Defined in: src/math/Vector3.ts:897

The x, y, and z components of this vector are rounded upward to the nearest integers.

Parameters

min

Vector3

minimum value

max

Vector3

maximum value

Returns

Vector3

Inherited from

Navi3DPoint.clamp


toString()

toString(): string

Defined in: src/math/Vector3.ts:963

Returns the string form of the current vector

Returns

string

Inherited from

Navi3DPoint.toString


normalizeToWay2D_XY()

normalizeToWay2D_XY(): void

Defined in: src/math/Vector3.ts:979

Returns

void

Inherited from

Navi3DPoint.normalizeToWay2D_XY


toArray()

toArray(): number[]

Defined in: src/math/Vector3.ts:997

Returns

number[]

Inherited from

Navi3DPoint.toArray


copyToBytes()

copyToBytes(byte): void

Defined in: src/math/Vector3.ts:1001

Parameters

byte

DataView

Returns

void

Inherited from

Navi3DPoint.copyToBytes


cross()

cross(a): this

Defined in: src/math/Vector3.ts:1016

Cross product with another vector. Returns a new Vector3.

Parameters

a

Vector3

Returns

this

Inherited from

Navi3DPoint.cross


crossVectors()

crossVectors(a, b): this

Defined in: src/math/Vector3.ts:1020

Parameters

a

Vector3

b

Vector3

Returns

this

Inherited from

Navi3DPoint.crossVectors


multiplyScalar()

multiplyScalar(scalar): Navi3DPointFat

Defined in: src/math/Vector3.ts:1025

Parameters

scalar

number

Returns

Navi3DPointFat

Inherited from

Navi3DPoint.multiplyScalar


setFromArray()

setFromArray(array, firstElementPos?): void

Defined in: src/math/Vector3.ts:1033

Parameters

array

number[]

firstElementPos?

number = 0

Returns

void

Inherited from

Navi3DPoint.setFromArray


divideScalar()

divideScalar(scalar): this

Defined in: src/math/Vector3.ts:1042

Divides this vector by scalar. Mutates and returns this.

Parameters

scalar

number

Returns

this

Inherited from

Navi3DPoint.divideScalar


clampLength()

clampLength(min, max): this

Defined in: src/math/Vector3.ts:1049

Clamps the length of this vector into [min, max]. Mutates and returns this.

Parameters

min

number

max

number

Returns

this

Inherited from

Navi3DPoint.clampLength


setScalar()

setScalar(value): Navi3DPointFat

Defined in: src/math/Vector3.ts:1054

Parameters

value

number

Returns

Navi3DPointFat

Inherited from

Navi3DPoint.setScalar


addScaledVector()

addScaledVector(v, scale): Vector3

Defined in: src/math/Vector3.ts:1061

Parameters

v

Vector3

scale

number

Returns

Vector3

Inherited from

Navi3DPoint.addScaledVector


dot()

dot(v): number

Defined in: src/math/Vector3.ts:1071

Dot product. Canonical alias of dotProduct.

Parameters

v

Vector3

Returns

number

Inherited from

Navi3DPoint.dot


lengthSq()

lengthSq(): number

Defined in: src/math/Vector3.ts:1076

Squared length of this vector.

Returns

number

Inherited from

Navi3DPoint.lengthSq


distanceTo()

distanceTo(v): number

Defined in: src/math/Vector3.ts:1081

Euclidean distance to v.

Parameters

v

Vector3

Returns

number

Inherited from

Navi3DPoint.distanceTo


angleTo()

angleTo(v): number

Defined in: src/math/Vector3.ts:1086

Angle between this and v, in radians (range [0, π]).

Parameters

v

Vector3

Returns

number

Inherited from

Navi3DPoint.angleTo


lerpVectors()

lerpVectors(v1, v2, alpha): this

Defined in: src/math/Vector3.ts:1094

Set this to v1 + (v2 - v1) * alpha. Canonical alias of lerp.

Parameters

v1

Vector3

v2

Vector3

alpha

number

Returns

this

Inherited from

Navi3DPoint.lerpVectors


setFromMatrixPosition()

setFromMatrixPosition(m): this

Defined in: src/math/Vector3.ts:1100

Set this = position column of Matrix4 m.

Parameters

m
rawData

ArrayLike<number>

Returns

this

Inherited from

Navi3DPoint.setFromMatrixPosition


setFromMatrixScale()

setFromMatrixScale(m): this

Defined in: src/math/Vector3.ts:1109

Set this = scale extracted from Matrix4 m (length of each column basis).

Parameters

m
rawData

ArrayLike<number>

Returns

this

Inherited from

Navi3DPoint.setFromMatrixScale


setFromMatrixColumn()

setFromMatrixColumn(m, index): this

Defined in: src/math/Vector3.ts:1121

Set this = column index of Matrix4 m (0, 1, 2, or 3).

Parameters

m
rawData

ArrayLike<number>

index

number

Returns

this

Inherited from

Navi3DPoint.setFromMatrixColumn


projectOnVector()

projectOnVector(v): this

Defined in: src/math/Vector3.ts:1131

Project this onto v. Mutates and returns this.

Parameters

v

Vector3

Returns

this

Inherited from

Navi3DPoint.projectOnVector


projectOnPlane()

projectOnPlane(planeNormal): this

Defined in: src/math/Vector3.ts:1139

Project this onto a plane defined by its normal (unit vector).

Parameters

planeNormal

Vector3

Returns

this

Inherited from

Navi3DPoint.projectOnPlane


reflect()

reflect(normal): this

Defined in: src/math/Vector3.ts:1145

Reflect this off a surface with the given unit normal.

Parameters

normal

Vector3

Returns

this

Inherited from

Navi3DPoint.reflect


applyMatrix3()

applyMatrix3(m): this

Defined in: src/math/Vector3.ts:1150

Apply a 3x3 matrix to this vector.

Parameters

m

{ rawData: ArrayLike<number>; } | { a: number; b: number; c: number; d: number; tx: number; ty: number; }

Returns

this

Inherited from

Navi3DPoint.applyMatrix3


applyAxisAngle()

applyAxisAngle(axis, angle): this

Defined in: src/math/Vector3.ts:1168

Apply axis-angle rotation (axis must be unit, angle in radians).

Parameters

axis

Vector3

angle

number

Returns

this

Inherited from

Navi3DPoint.applyAxisAngle


transformDirection()

transformDirection(m): this

Defined in: src/math/Vector3.ts:1178

Transform this as a direction (no translation) by Matrix4 m, then normalize.

Parameters

m
rawData

ArrayLike<number>

Returns

this

Inherited from

Navi3DPoint.transformDirection


fromArray()

fromArray(array, offset?): this

Defined in: src/math/Vector3.ts:1188

Canonical alias of setFromArray.

Parameters

array

ArrayLike<number>

offset?

number = 0

Returns

this

Inherited from

Navi3DPoint.fromArray


floor()

floor(): this

Defined in: src/math/Vector3.ts:1195

Returns

this

Inherited from

Navi3DPoint.floor


ceil()

ceil(): this

Defined in: src/math/Vector3.ts:1202

Returns

this

Inherited from

Navi3DPoint.ceil


round()

round(): this

Defined in: src/math/Vector3.ts:1209

Returns

this

Inherited from

Navi3DPoint.round


roundToZero()

roundToZero(): this

Defined in: src/math/Vector3.ts:1216

Returns

this

Inherited from

Navi3DPoint.roundToZero


random()

random(): this

Defined in: src/math/Vector3.ts:1224

Fill this with components in [0, 1).

Returns

this

Inherited from

Navi3DPoint.random


pointInsideTriangle()

static pointInsideTriangle(pt, pt0, pt1, pt2): boolean

Defined in: src/math/Vector3.ts:1255

Parameters

pt

Vector3

pt0

Vector3

pt1

Vector3

pt2

Vector3

Returns

boolean

Inherited from

Navi3DPoint.pointInsideTriangle


serialize()

static serialize(position): Vector3

Defined in: src/math/Vector3.ts:1284

Parameters

position

Vector3

Returns

Vector3

Inherited from

Navi3DPoint.serialize


equalPoint()

static equalPoint(p1, p2): boolean

Defined in: src/math/navigation/Navi3DPoint.ts:27

Parameters

p1

Vector3

p2

Vector3

Returns

boolean

Inherited from

Navi3DPoint.equalPoint


calcDistance()

static calcDistance(pt1, pt2): number

Defined in: src/math/navigation/Navi3DPoint.ts:31

Parameters

pt1

Vector3

pt2

Vector3

Returns

number

Inherited from

Navi3DPoint.calcDistance


scalePoint()

scalePoint(value?): Navi3DPointFat

Defined in: src/math/navigation/Navi3DPointFat.ts:25

Parameters

value?

number = 0.7

Returns

Navi3DPointFat