StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/gl-quat/setAxes.js

33 lines
878 B

var mat3create = require('gl-mat3/create')
var fromMat3 = require('./fromMat3')
var normalize = require('./normalize')
module.exports = setAxes
var matr = mat3create()
/**
* Sets the specified quaternion with values corresponding to the given
* axes. Each axis is a vec3 and is expected to be unit length and
* perpendicular to all other specified axes.
*
* @param {vec3} view the vector representing the viewing direction
* @param {vec3} right the vector representing the local "right" direction
* @param {vec3} up the vector representing the local "up" direction
* @returns {quat} out
*/
function setAxes (out, view, right, up) {
matr[0] = right[0]
matr[3] = right[1]
matr[6] = right[2]
matr[1] = up[0]
matr[4] = up[1]
matr[7] = up[2]
matr[2] = -view[0]
matr[5] = -view[1]
matr[8] = -view[2]
return normalize(out, fromMat3(out, matr))
}