Search
Preparing search index...
The search index is not available
gtools
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
gtools
math/vector3
Vector3
Class Vector3
Hierarchy
Vector3
Implements
SimpleVector3
Index
Constructors
constructor
Properties
x
y
z
Accessors
avg
length
xy
xz
yx
yz
zx
zy
ONE
UP
ZERO
Methods
add
clone
cross
dot
get
Normalized
mul
normalize
set
set
Data
sub
sum
to
Array
add
create
From
Spherical
Coords
dist
dist
Sqrt
dot
equals
equals
Approximately
from
from
Array
from
Vec
is
Vector
length
Of
max
min
mul
mul
Num
normalize
sub
sum
sum
Num
Constructors
constructor
new
Vector3
(
x
?:
number
, y
?:
number
, z
?:
number
)
:
Vector3
Parameters
x:
number
= 0
y:
number
= 0
z:
number
= 0
Returns
Vector3
Properties
x
x
:
number
= 0
y
y
:
number
= 0
z
z
:
number
= 0
Accessors
avg
get
avg
(
)
:
number
Returns
number
length
get
length
(
)
:
number
Returns
number
xy
get
xy
(
)
:
Vector2
Returns
Vector2
xz
get
xz
(
)
:
Vector2
Returns
Vector2
yx
get
yx
(
)
:
Vector2
Returns
Vector2
yz
get
yz
(
)
:
Vector2
Returns
Vector2
zx
get
zx
(
)
:
Vector2
Returns
Vector2
zy
get
zy
(
)
:
Vector2
Returns
Vector2
Static
ONE
get
ONE
(
)
:
Vector3
Returns
Vector3
Static
UP
get
UP
(
)
:
Vector3
Returns
Vector3
Static
ZERO
get
ZERO
(
)
:
Vector3
Returns
Vector3
Methods
add
add
(
vec
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
vec:
Readonly
<
SimpleVector3
>
Returns
Vector3
clone
clone
(
)
:
Vector3
Returns
Vector3
cross
cross
(
v
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
v:
Readonly
<
SimpleVector3
>
Returns
Vector3
dot
dot
(
v
:
Readonly
<
SimpleVector3
>
)
:
number
Parameters
v:
Readonly
<
SimpleVector3
>
Returns
number
get
Normalized
get
Normalized
(
)
:
SimpleVector3
Returns
SimpleVector3
mul
mul
(
value
:
number
|
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
value:
number
|
Readonly
<
SimpleVector3
>
Returns
Vector3
normalize
normalize
(
)
:
Vector3
Returns
Vector3
set
set
(
vec
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
vec:
Readonly
<
SimpleVector3
>
Returns
Vector3
set
Data
set
Data
(
x
:
number
, y
:
number
, z
:
number
)
:
Vector3
Parameters
x:
number
y:
number
z:
number
Returns
Vector3
sub
sub
(
vec
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
vec:
Readonly
<
SimpleVector3
>
Returns
Vector3
sum
sum
(
)
:
number
Returns
number
to
Array
to
Array
(
)
:
[
number
,
number
,
number
]
Returns
[
number
,
number
,
number
]
Static
add
add
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
Vector3
deprecated
use
sum
instead
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
Vector3
Static
create
From
Spherical
Coords
create
From
Spherical
Coords
(
radius
:
number
, phi
:
number
, theta
:
number
)
:
Vector3
Parameters
radius:
number
phi:
number
theta:
number
Returns
Vector3
Static
dist
dist
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
number
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
number
Static
dist
Sqrt
dist
Sqrt
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
number
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
number
Static
dot
dot
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
number
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
number
Static
equals
equals
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
boolean
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
boolean
Static
equals
Approximately
equals
Approximately
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
, EPSILON
?:
number
)
:
boolean
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
EPSILON:
number
= 0.0000001
Returns
boolean
Static
from
from
(
valA
:
number
, valB
?:
number
, valC
?:
number
)
:
Vector3
Parameters
valA:
number
valB:
number
= ...
valC:
number
= ...
Returns
Vector3
Static
from
Array
from
Array
(
value
:
[
number
,
number
,
number
]
|
Float32Array
)
:
Vector3
Parameters
value:
[
number
,
number
,
number
]
|
Float32Array
Returns
Vector3
Static
from
Vec
from
Vec
(
vec
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
vec:
Readonly
<
SimpleVector3
>
Returns
Vector3
Static
is
Vector
is
Vector
(
item
:
any
)
:
item
is
SimpleVector3
Parameters
item:
any
Returns
item
is
SimpleVector3
Static
length
Of
length
Of
(
vector
:
Readonly
<
SimpleVector3
>
)
:
number
Parameters
vector:
Readonly
<
SimpleVector3
>
Returns
number
Static
max
max<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
result:
T
= ...
Returns
T
Static
min
min<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
result:
T
= ...
Returns
T
Static
mul
mul<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
result:
T
= ...
Returns
T
Static
mul
Num
mul
Num<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, val
:
number
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
val:
number
result:
T
= ...
Returns
T
Static
normalize
normalize<T>
(
vec
:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vec:
T
Returns
T
Static
sub
sub
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
)
:
Vector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
Returns
Vector3
Static
sum
sum<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, vecB
:
Readonly
<
SimpleVector3
>
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
vecB:
Readonly
<
SimpleVector3
>
result:
T
= ...
Returns
T
Static
sum
Num
sum
Num<T>
(
vecA
:
Readonly
<
SimpleVector3
>
, val
:
number
, result
?:
T
)
:
T
Type parameters
T
:
SimpleVector3
Parameters
vecA:
Readonly
<
SimpleVector3
>
val:
number
result:
T
= ...
Returns
T
Modules
math/vector3
Vector3
constructor
x
y
z
avg
length
xy
xz
yx
yz
zx
zy
ONE
UP
ZERO
add
clone
cross
dot
get
Normalized
mul
normalize
set
set
Data
sub
sum
to
Array
add
create
From
Spherical
Coords
dist
dist
Sqrt
dot
equals
equals
Approximately
from
from
Array
from
Vec
is
Vector
length
Of
max
min
mul
mul
Num
normalize
sub
sum
sum
Num
Generated using
TypeDoc
use sum instead