Lines Matching defs:quat

991  * Transforms the vec3 with a quat
995 * @param {quat} q quaternion to transform with
1002 // calculate quat * vec
1008 // calculate result * inverse quat
1479 * Transforms the vec4 with a quat
1483 * @param {quat} q quaternion to transform with
1490 // calculate quat * vec
1496 // calculate result * inverse quat
2432 * @param {quat} q Quaternion to create matrix from
3094 * quat4.toMat4(quat, quatMat);
3143 * @param {quat} q Quaternion to create matrix from
3416 * @name quat
3419 var quat = {};
3422 * Creates a new identity quat
3424 * @returns {quat} a new quaternion
3426 quat.create = function() {
3436 * Creates a new quat initialized with values from an existing quaternion
3438 * @param {quat} a quaternion to clone
3439 * @returns {quat} a new quaternion
3442 quat.clone = vec4.clone;
3445 * Creates a new quat initialized with the given values
3451 * @returns {quat} a new quaternion
3454 quat.fromValues = vec4.fromValues;
3457 * Copy the values from one quat to another
3459 * @param {quat} out the receiving quaternion
3460 * @param {quat} a the source quaternion
3461 * @returns {quat} out
3464 quat.copy = vec4.copy;
3467 * Set the components of a quat to the given values
3469 * @param {quat} out the receiving quaternion
3474 * @returns {quat} out
3477 quat.set = vec4.set;
3480 * Set a quat to the identity quaternion
3482 * @param {quat} out the receiving quaternion
3483 * @returns {quat} out
3485 quat.identity = function(out) {
3494 * Sets a quat from the given angle and rotation axis,
3497 * @param {quat} out the receiving quaternion
3500 * @returns {quat} out
3502 quat.setAxisAngle = function(out, axis, rad) {
3513 * Adds two quat's
3515 * @param {quat} out the receiving quaternion
3516 * @param {quat} a the first operand
3517 * @param {quat} b the second operand
3518 * @returns {quat} out
3521 quat.add = vec4.add;
3524 * Multiplies two quat's
3526 * @param {quat} out the receiving quaternion
3527 * @param {quat} a the first operand
3528 * @param {quat} b the second operand
3529 * @returns {quat} out
3531 quat.multiply = function(out, a, b) {
3543 * Alias for {@link quat.multiply}
3546 quat.mul = quat.multiply;
3549 * Scales a quat by a scalar number
3551 * @param {quat} out the receiving vector
3552 * @param {quat} a the vector to scale
3554 * @returns {quat} out
3557 quat.scale = vec4.scale;
3562 * @param {quat} out quat receiving operation result
3563 * @param {quat} a quat to rotate
3565 * @returns {quat} out
3567 quat.rotateX = function (out, a, rad) {
3583 * @param {quat} out quat receiving operation result
3584 * @param {quat} a quat to rotate
3586 * @returns {quat} out
3588 quat.rotateY = function (out, a, rad) {
3604 * @param {quat} out quat receiving operation result
3605 * @param {quat} a quat to rotate
3607 * @returns {quat} out
3609 quat.rotateZ = function (out, a, rad) {
3623 * Calculates the W component of a quat from the X, Y, and Z components.
3627 * @param {quat} out the receiving quaternion
3628 * @param {quat} a quat to calculate W component of
3629 * @returns {quat} out
3631 quat.calculateW = function (out, a) {
3642 * Calculates the dot product of two quat's
3644 * @param {quat} a the first operand
3645 * @param {quat} b the second operand
3649 quat.dot = vec4.dot;
3652 * Performs a linear interpolation between two quat's
3654 * @param {quat} out the receiving quaternion
3655 * @param {quat} a the first operand
3656 * @param {quat} b the second operand
3658 * @returns {quat} out
3661 quat.lerp = vec4.lerp;
3664 * Performs a spherical linear interpolation between two quat
3666 * @param {quat} out the receiving quaternion
3667 * @param {quat} a the first operand
3668 * @param {quat} b the second operand
3670 * @returns {quat} out
3672 quat.slerp = function (out, a, b, t) {
3715 * Calculates the inverse of a quat
3717 * @param {quat} out the receiving quaternion
3718 * @param {quat} a quat to calculate inverse of
3719 * @returns {quat} out
3721 quat.invert = function(out, a) {
3736 * Calculates the conjugate of a quat
3737 * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
3739 * @param {quat} out the receiving quaternion
3740 * @param {quat} a quat to calculate conjugate of
3741 * @returns {quat} out
3743 quat.conjugate = function (out, a) {
3752 * Calculates the length of a quat
3754 * @param {quat} a vector to calculate length of
3758 quat.length = vec4.length;
3761 * Alias for {@link quat.length}
3764 quat.len = quat.length;
3767 * Calculates the squared length of a quat
3769 * @param {quat} a vector to calculate squared length of
3773 quat.squaredLength = vec4.squaredLength;
3776 * Alias for {@link quat.squaredLength}
3779 quat.sqrLen = quat.squaredLength;
3782 * Normalize a quat
3784 * @param {quat} out the receiving quaternion
3785 * @param {quat} a quaternion to normalize
3786 * @returns {quat} out
3789 quat.normalize = vec4.normalize;
3794 * @param {quat} out the receiving quaternion
3796 * @returns {quat} out
3799 quat.fromMat3 = (function() {
3840 * @param {quat} vec vector to represent as a string
3843 quat.str = function (a) {
3844 return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
3848 exports.quat = quat;