Lines Matching refs:vec3

435  * @param {vec3} out the receiving vector
438 * @returns {vec3} out
610 * @name vec3
613 var vec3 = {};
616 * Creates a new, empty vec3
618 * @returns {vec3} a new 3D vector
620 vec3.create = function() {
629 * Creates a new vec3 initialized with values from an existing vector
631 * @param {vec3} a vector to clone
632 * @returns {vec3} a new 3D vector
634 vec3.clone = function(a) {
643 * Creates a new vec3 initialized with the given values
648 * @returns {vec3} a new 3D vector
650 vec3.fromValues = function(x, y, z) {
659 * Copy the values from one vec3 to another
661 * @param {vec3} out the receiving vector
662 * @param {vec3} a the source vector
663 * @returns {vec3} out
665 vec3.copy = function(out, a) {
673 * Set the components of a vec3 to the given values
675 * @param {vec3} out the receiving vector
679 * @returns {vec3} out
681 vec3.set = function(out, x, y, z) {
689 * Adds two vec3's
691 * @param {vec3} out the receiving vector
692 * @param {vec3} a the first operand
693 * @param {vec3} b the second operand
694 * @returns {vec3} out
696 vec3.add = function(out, a, b) {
704 * Subtracts two vec3's
706 * @param {vec3} out the receiving vector
707 * @param {vec3} a the first operand
708 * @param {vec3} b the second operand
709 * @returns {vec3} out
711 vec3.subtract = function(out, a, b) {
719 * Alias for {@link vec3.subtract}
722 vec3.sub = vec3.subtract;
725 * Multiplies two vec3's
727 * @param {vec3} out the receiving vector
728 * @param {vec3} a the first operand
729 * @param {vec3} b the second operand
730 * @returns {vec3} out
732 vec3.multiply = function(out, a, b) {
740 * Alias for {@link vec3.multiply}
743 vec3.mul = vec3.multiply;
746 * Divides two vec3's
748 * @param {vec3} out the receiving vector
749 * @param {vec3} a the first operand
750 * @param {vec3} b the second operand
751 * @returns {vec3} out
753 vec3.divide = function(out, a, b) {
761 * Alias for {@link vec3.divide}
764 vec3.div = vec3.divide;
767 * Returns the minimum of two vec3's
769 * @param {vec3} out the receiving vector
770 * @param {vec3} a the first operand
771 * @param {vec3} b the second operand
772 * @returns {vec3} out
774 vec3.min = function(out, a, b) {
782 * Returns the maximum of two vec3's
784 * @param {vec3} out the receiving vector
785 * @param {vec3} a the first operand
786 * @param {vec3} b the second operand
787 * @returns {vec3} out
789 vec3.max = function(out, a, b) {
797 * Scales a vec3 by a scalar number
799 * @param {vec3} out the receiving vector
800 * @param {vec3} a the vector to scale
802 * @returns {vec3} out
804 vec3.scale = function(out, a, b) {
812 * Calculates the euclidian distance between two vec3's
814 * @param {vec3} a the first operand
815 * @param {vec3} b the second operand
818 vec3.distance = function(a, b) {
826 * Alias for {@link vec3.distance}
829 vec3.dist = vec3.distance;
832 * Calculates the squared euclidian distance between two vec3's
834 * @param {vec3} a the first operand
835 * @param {vec3} b the second operand
838 vec3.squaredDistance = function(a, b) {
846 * Alias for {@link vec3.squaredDistance}
849 vec3.sqrDist = vec3.squaredDistance;
852 * Calculates the length of a vec3
854 * @param {vec3} a vector to calculate length of
857 vec3.length = function (a) {
865 * Alias for {@link vec3.length}
868 vec3.len = vec3.length;
871 * Calculates the squared length of a vec3
873 * @param {vec3} a vector to calculate squared length of
876 vec3.squaredLength = function (a) {
884 * Alias for {@link vec3.squaredLength}
887 vec3.sqrLen = vec3.squaredLength;
890 * Negates the components of a vec3
892 * @param {vec3} out the receiving vector
893 * @param {vec3} a vector to negate
894 * @returns {vec3} out
896 vec3.negate = function(out, a) {
904 * Normalize a vec3
906 * @param {vec3} out the receiving vector
907 * @param {vec3} a vector to normalize
908 * @returns {vec3} out
910 vec3.normalize = function(out, a) {
926 * Calculates the dot product of two vec3's
928 * @param {vec3} a the first operand
929 * @param {vec3} b the second operand
932 vec3.dot = function (a, b) {
937 * Computes the cross product of two vec3's
939 * @param {vec3} out the receiving vector
940 * @param {vec3} a the first operand
941 * @param {vec3} b the second operand
942 * @returns {vec3} out
944 vec3.cross = function(out, a, b) {
955 * Performs a linear interpolation between two vec3's
957 * @param {vec3} out the receiving vector
958 * @param {vec3} a the first operand
959 * @param {vec3} b the second operand
961 * @returns {vec3} out
963 vec3.lerp = function (out, a, b, t) {
974 * Transforms the vec3 with a mat4.
977 * @param {vec3} out the receiving vector
978 * @param {vec3} a the vector to transform
980 * @returns {vec3} out
982 vec3.transformMat4 = function(out, a, m) {
991 * Transforms the vec3 with a quat
993 * @param {vec3} out the receiving vector
994 * @param {vec3} a the vector to transform
996 * @returns {vec3} out
998 vec3.transformQuat = function(out, a, q) {
1019 * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
1027 vec3.forEach = (function() {
1028 var vec = vec3.create();
1059 * @param {vec3} vec vector to represent as a string
1062 vec3.str = function (a) {
1063 return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';
1067 exports.vec3 = vec3;
2833 * @param {vec3} v vector to translate by
2866 * Scales the mat4 by the dimensions in the given vec3
2870 * @param {vec3} v the vec3 to scale the matrix by
2901 * @param {vec3} axis the axis to rotate around
3099 * @param {vec3} v Translation vector
3292 * @param {vec3} eye Position of the viewer
3293 * @param {vec3} center Point the viewer is looking at
3294 * @param {vec3} up vec3 pointing up
3498 * @param {vec3} axis the axis around which to rotate