Vec3
Vector utilities.
angle( b0, ai, bi, ci )
static
Float
src/math/Vec3.js:163
Calculate angle between segments ab and bc
-
b0ArrayVec3 buffer
-
aiIntVector index a
-
biIntVector index b
-
ciIntVector index c
Returns: Float
Angle in radians
copy( b0, ai, out )
static
src/math/Vec3.js:56
-
b0ArrayVec3 buffer
-
aiIntVector index
-
outArrayDestination vector
create( positions )
static
Float32Array
src/math/Vec3.js:19
-
positionsInt | ArrayNumber of vectors or array of initial values
Returns: Float32Array
Vec3 buffer
distance( b0, ai, bi )
static
Float
src/math/Vec3.js:124
-
b0ArrayVec3 buffer
-
aiIntVector index a
-
biIntVector index b
Returns: Float
Distance from a to b
distanceSq( b0, ai, bi )
static
Float
src/math/Vec3.js:105
-
b0ArrayVec3 buffer
-
aiIntVector index a
-
biIntVector index b
Returns: Float
Squared distance from a to b
length( b0, ai )
static
Float
src/math/Vec3.js:89
-
b0ArrayVec3 buffer
-
aiIntVector index
Returns: Float
Length of vector
lengthSq( b0, ai )
static
Float
src/math/Vec3.js:73
-
b0ArrayVec3 buffer
-
aiIntVector index
Returns: Float
Squared length of vector
normalize( b0, ai )
static
src/math/Vec3.js:143
Normalize vector in place
-
b0ArrayVec3 buffer
-
aiIntVector index a
set( b0, i, x, [y], [z] )
static
src/math/Vec3.js:31
Set single vector in buffer
-
b0ArrayVec3 buffer
-
iIntVector index
-
xArray | FloatVector or x component value
-
[y]Float -
[z]Float