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
_edge
Returns
Navi3DPointFat
Overrides
Properties
MAX
readonlystaticMAX:Vector3
Defined in: src/math/Vector3.ts:11
Vector maximum
Inherited from
MIN
readonlystaticMIN:Vector3
Defined in: src/math/Vector3.ts:16
Vector minimum
Inherited from
SAFE_MAX
readonlystaticSAFE_MAX:Vector3
Defined in: src/math/Vector3.ts:21
Vector maximum integer value
Inherited from
SAFE_MIN
readonlystaticSAFE_MIN:Vector3
Defined in: src/math/Vector3.ts:26
Vector minimum integer value
Inherited from
X_AXIS
readonlystaticX_AXIS:Vector3
Defined in: src/math/Vector3.ts:31
X axis positive axis coordinate (1, 0, 0).
Inherited from
neg_X_AXIS
readonlystaticneg_X_AXIS:Vector3
Defined in: src/math/Vector3.ts:36
The X-axis is negative (-1, 0, 0).
Inherited from
Y_AXIS
readonlystaticY_AXIS:Vector3
Defined in: src/math/Vector3.ts:41
The y axis defined as a Vector3 object with coordinates (0,1,0).
Inherited from
Z_AXIS
readonlystaticZ_AXIS:Vector3
Defined in: src/math/Vector3.ts:46
The z axis defined as a Vector3 object with coordinates (0,0,1).
Inherited from
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
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
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
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
CALC_VECTOR3D1
staticCALC_VECTOR3D1:Vector3
Defined in: src/math/navigation/Navi3DPoint.ts:6
Inherited from
CALC_VECTOR3D2
staticCALC_VECTOR3D2:Vector3
Defined in: src/math/navigation/Navi3DPoint.ts:8
Inherited from
CALC_VECTOR3D3
staticCALC_VECTOR3D3:Vector3
Defined in: src/math/navigation/Navi3DPoint.ts:10
Inherited from
CALC_VECTOR3D4
staticCALC_VECTOR3D4:Vector3
Defined in: src/math/navigation/Navi3DPoint.ts:12
Inherited from
CALC_VECTOR3D5
staticCALC_VECTOR3D5:Vector3
Defined in: src/math/navigation/Navi3DPoint.ts:14
Inherited from
radius
radius:
number=0
Defined in: src/math/navigation/Navi3DPointFat.ts:9
Accessors
ZERO
Get Signature
get
staticZERO():Vector3
Defined in: src/math/Vector3.ts:91
Returns a new vector with zero x, y, and z components
Returns
Inherited from
ONE
Get Signature
get
staticONE():Vector3
Defined in: src/math/Vector3.ts:98
Returns a new vector whose x, y, and z components are all 1
Returns
Inherited from
LEFT
Get Signature
get
staticLEFT():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
Inherited from
RIGHT
Get Signature
get
staticRIGHT():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
Inherited from
UP
Get Signature
get
staticUP():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
Inherited from
DOWN
Get Signature
get
staticDOWN():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
Inherited from
BACK
Get Signature
get
staticBACK():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
Inherited from
FORWARD
Get Signature
get
staticFORWARD():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
Inherited from
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
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
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
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
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
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
position
Get Signature
get position():
this
Defined in: src/math/Vector3.ts:279
Get the current vector
Returns
this
Inherited from
id
Get Signature
get id():
number
Defined in: src/math/navigation/Navi3DPoint.ts:23
Returns
number
Inherited from
ownerPoint
Get Signature
get ownerPoint():
Navi3DPoint
Defined in: src/math/navigation/Navi3DPointFat.ts:17
Returns
ownerEdge
Get Signature
get ownerEdge():
Navi3DEdge
Defined in: src/math/navigation/Navi3DPointFat.ts:21
Returns
Methods
getTowPointbyDir()
staticgetTowPointbyDir(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
tp1
tp2
width
number
aix
Returns
void
Inherited from
pointToLine()
staticpointToLine(point1,point2,position):number
Defined in: src/math/Vector3.ts:319
Calculate the distance from the point to the line
Parameters
point1
Starting point of line segment
point2
End point of line segment
position
Point position
Returns
number
Distance from a point to a line segment
Inherited from
dot()
staticdot(a,b):number
Defined in: src/math/Vector3.ts:353
Take the dot product of two vectors.
Parameters
a
Vector a
b
Vector b
Returns
number
Inherited from
getPoints()
staticgetPoints(total,randSeed):any[]
Defined in: src/math/Vector3.ts:357
Parameters
total
number
randSeed
number
Returns
any[]
Inherited from
getPointNumbers()
staticgetPointNumbers(total,randSeed):any[]
Defined in: src/math/Vector3.ts:366
Parameters
total
number
randSeed
number
Returns
any[]
Inherited from
getAngle()
staticgetAngle(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
source vector.
to
target vector.
Returns
number
Inherited from
sqrMagnitude()
staticsqrMagnitude(arg0):number
Defined in: src/math/Vector3.ts:385
Parameters
arg0
Returns
number
Inherited from
getZYAngle()
staticgetZYAngle(zd,yd):number
Defined in: src/math/Vector3.ts:389
Parameters
zd
yd
Returns
number
Inherited from
sub()
staticsub(a,b,target?):Vector3
Defined in: src/math/Vector3.ts:399
Subtract two vectors
Parameters
a
Vector a
b
Vector b
target?
Vector3 = null
output vector
Returns
Inherited from
add()
staticadd(a,b,target?):Vector3
Defined in: src/math/Vector3.ts:415
Add two vectors
Parameters
a
Vector a
b
Vector b
target?
Vector3 = null
output vector
Returns
Inherited from
multiply()
staticmultiply(a,b,result?):Vector3
Defined in: src/math/Vector3.ts:426
Component-wise multiply two vectors
Parameters
a
b
result?
Returns
Inherited from
divide()
staticdivide(a,b,result?):Vector3
Defined in: src/math/Vector3.ts:437
Component-wise divide two vectors
Parameters
a
b
result?
Returns
Inherited from
multiplyScalar()
staticmultiplyScalar(a,s,result?):Vector3
Defined in: src/math/Vector3.ts:448
Multiply a vector by a scalar
Parameters
a
s
number
result?
Returns
Inherited from
addScaledVector()
staticaddScaledVector(a,b,s,result?):Vector3
Defined in: src/math/Vector3.ts:459
result = a + b * s
Parameters
a
b
s
number
result?
Returns
Inherited from
cross()
staticcross(a,b,result?):Vector3
Defined in: src/math/Vector3.ts:470
Cross product of two vectors
Parameters
a
b
result?
Returns
Inherited from
negate()
staticnegate(a,result?):Vector3
Defined in: src/math/Vector3.ts:484
Negate a vector
Parameters
a
result?
Returns
Inherited from
min()
staticmin(a,b,result?):Vector3
Defined in: src/math/Vector3.ts:495
Component-wise minimum of two vectors
Parameters
a
b
result?
Returns
Inherited from
max()
staticmax(a,b,result?):Vector3
Defined in: src/math/Vector3.ts:506
Component-wise maximum of two vectors
Parameters
a
b
result?
Returns
Inherited from
distance()
staticdistance(pt1,pt2):number
Defined in: src/math/Vector3.ts:549
Calculate the distance between two vectors
Parameters
pt1
Vector 1
pt2
Vector 2
Returns
number
number The distance between two vectors
Inherited from
squareDistance()
staticsquareDistance(pt1,pt2):number
Defined in: src/math/Vector3.ts:562
Calculate the square distance between two vectors
Parameters
pt1
Vector 1
pt2
Vector 2
Returns
number
number The square distance between two vectors
Inherited from
distanceXZ()
staticdistanceXZ(pt1,pt2):number
Defined in: src/math/Vector3.ts:574
Calculate the distance between two vectors XZ axes
Parameters
pt1
Vector 1
pt2
Vector 2
Returns
number
number The distance between two vectors
Inherited from
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
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
Returns
this
Inherited from
addVectors()
addVectors(
a,b):this
Defined in: src/math/Vector3.ts:605
Set this = a + b. Ternary mutator form.
Parameters
a
b
Returns
this
Inherited from
subVectors()
subVectors(
a,b):this
Defined in: src/math/Vector3.ts:609
Parameters
a
b
Returns
this
Inherited from
multiplyVectors()
multiplyVectors(
a,b):this
Defined in: src/math/Vector3.ts:614
Set this = a * b component-wise.
Parameters
a
b
Returns
this
Inherited from
addScalar()
addScalar(
scalar):Vector3
Defined in: src/math/Vector3.ts:618
Parameters
scalar
number
Returns
Inherited from
subScalar()
subScalar(
scalar):Vector3
Defined in: src/math/Vector3.ts:625
Parameters
scalar
number
Returns
Inherited from
min()
min(
v):this
Defined in: src/math/Vector3.ts:635
Component-wise minimum with v. Mutates and returns this.
Parameters
v
Returns
this
Inherited from
max()
max(
v):this
Defined in: src/math/Vector3.ts:642
Component-wise maximum with v. Mutates and returns this.
Parameters
v
Returns
this
Inherited from
distanceToSquared()
distanceToSquared(
v):number
Defined in: src/math/Vector3.ts:646
Parameters
v
Returns
number
Inherited from
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
clone()
clone():
Vector3
Defined in: src/math/Vector3.ts:667
Clone a vector with the same components as the current vector
Returns
Inherited from
decrementBy()
decrementBy(
a):this
Defined in: src/math/Vector3.ts:681
Subtract two vectors and assign the result to yourself
Parameters
a
Minus vector
Returns
this
Inherited from
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
The vector that you need to compute
Returns
number
number Returns the Angle relationship between two vectors
Inherited from
equals()
equals(
toCompare,allFour?):boolean
Defined in: src/math/Vector3.ts:716
Find whether the values of two vectors are identical
Parameters
toCompare
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
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
vector
Returns
this
Inherited from
divide()
divide(
v):this
Defined in: src/math/Vector3.ts:747
Component-wise divides this vector by v. Mutates and returns this.
Parameters
v
Returns
this
Inherited from
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
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
Inherited from
applyQuaternion()
applyQuaternion(
q):Navi3DPointFat
Defined in: src/math/Vector3.ts:790
Apply the rotation quaternion
Parameters
q
any
quaternion
Returns
Navi3DPointFat
Inherited from
applyMatrix4()
applyMatrix4(
m):this
Defined in: src/math/Vector3.ts:815
Parameters
m
any
Returns
this
Inherited from
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
copy()
copy(
src):this
Defined in: src/math/Vector3.ts:839
Copy the components of the source vector to this vector
Parameters
src
Source vector
Returns
this
Inherited from
sub()
sub(
a):this
Defined in: src/math/Vector3.ts:858
Parameters
a
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
multiply()
multiply(
other):this
Defined in: src/math/Vector3.ts:865
Component-wise multiplies this vector by other. Mutates and returns this.
Parameters
other
Returns
this
Inherited from
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
Vector 1
v1
Vector 2
t
number
Interpolation factor
Returns
void
Inherited from
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
minimum value
max
maximum value
Returns
Inherited from
toString()
toString():
string
Defined in: src/math/Vector3.ts:963
Returns the string form of the current vector
Returns
string
Inherited from
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
copyToBytes()
copyToBytes(
byte):void
Defined in: src/math/Vector3.ts:1001
Parameters
byte
DataView
Returns
void
Inherited from
cross()
cross(
a):this
Defined in: src/math/Vector3.ts:1016
Cross product with another vector. Returns a new Vector3.
Parameters
a
Returns
this
Inherited from
crossVectors()
crossVectors(
a,b):this
Defined in: src/math/Vector3.ts:1020
Parameters
a
b
Returns
this
Inherited from
multiplyScalar()
multiplyScalar(
scalar):Navi3DPointFat
Defined in: src/math/Vector3.ts:1025
Parameters
scalar
number
Returns
Navi3DPointFat
Inherited from
setFromArray()
setFromArray(
array,firstElementPos?):void
Defined in: src/math/Vector3.ts:1033
Parameters
array
number[]
firstElementPos?
number = 0
Returns
void
Inherited from
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
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
setScalar()
setScalar(
value):Navi3DPointFat
Defined in: src/math/Vector3.ts:1054
Parameters
value
number
Returns
Navi3DPointFat
Inherited from
addScaledVector()
addScaledVector(
v,scale):Vector3
Defined in: src/math/Vector3.ts:1061
Parameters
v
scale
number
Returns
Inherited from
dot()
dot(
v):number
Defined in: src/math/Vector3.ts:1071
Dot product. Canonical alias of dotProduct.
Parameters
v
Returns
number
Inherited from
lengthSq()
lengthSq():
number
Defined in: src/math/Vector3.ts:1076
Squared length of this vector.
Returns
number
Inherited from
distanceTo()
distanceTo(
v):number
Defined in: src/math/Vector3.ts:1081
Euclidean distance to v.
Parameters
v
Returns
number
Inherited from
angleTo()
angleTo(
v):number
Defined in: src/math/Vector3.ts:1086
Angle between this and v, in radians (range [0, π]).
Parameters
v
Returns
number
Inherited from
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
v2
alpha
number
Returns
this
Inherited from
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
Returns
this
Inherited from
projectOnPlane()
projectOnPlane(
planeNormal):this
Defined in: src/math/Vector3.ts:1139
Project this onto a plane defined by its normal (unit vector).
Parameters
planeNormal
Returns
this
Inherited from
reflect()
reflect(
normal):this
Defined in: src/math/Vector3.ts:1145
Reflect this off a surface with the given unit normal.
Parameters
normal
Returns
this
Inherited from
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
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
angle
number
Returns
this
Inherited from
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
floor()
floor():
this
Defined in: src/math/Vector3.ts:1195
Returns
this
Inherited from
ceil()
ceil():
this
Defined in: src/math/Vector3.ts:1202
Returns
this
Inherited from
round()
round():
this
Defined in: src/math/Vector3.ts:1209
Returns
this
Inherited from
roundToZero()
roundToZero():
this
Defined in: src/math/Vector3.ts:1216
Returns
this
Inherited from
random()
random():
this
Defined in: src/math/Vector3.ts:1224
Fill this with components in [0, 1).
Returns
this
Inherited from
pointInsideTriangle()
staticpointInsideTriangle(pt,pt0,pt1,pt2):boolean
Defined in: src/math/Vector3.ts:1255
Parameters
pt
pt0
pt1
pt2
Returns
boolean
Inherited from
Navi3DPoint.pointInsideTriangle
serialize()
staticserialize(position):Vector3
Defined in: src/math/Vector3.ts:1284
Parameters
position
Returns
Inherited from
equalPoint()
staticequalPoint(p1,p2):boolean
Defined in: src/math/navigation/Navi3DPoint.ts:27
Parameters
p1
p2
Returns
boolean
Inherited from
calcDistance()
staticcalcDistance(pt1,pt2):number
Defined in: src/math/navigation/Navi3DPoint.ts:31
Parameters
pt1
pt2
Returns
number
Inherited from
scalePoint()
scalePoint(
value?):Navi3DPointFat
Defined in: src/math/navigation/Navi3DPointFat.ts:25
Parameters
value?
number = 0.7
Returns
Navi3DPointFat

