From 7bee50379c1df86bb571e0e8d6c08e24d25231f5 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Mon, 9 Jul 2012 16:38:08 -0700 Subject: BSD License --- .../RDGE/src/core/script/math/mat4.js | 49 +++++++++++----------- .../RDGE/src/core/script/math/quat.js | 29 ++++++------- .../RDGE/src/core/script/math/vec2.js | 29 ++++++------- .../RDGE/src/core/script/math/vec3.js | 45 ++++++++++---------- .../RDGE/src/core/script/math/vec4.js | 27 ++++++------ 5 files changed, 92 insertions(+), 87 deletions(-) (limited to 'js/helper-classes/RDGE/src/core/script/math') diff --git a/js/helper-classes/RDGE/src/core/script/math/mat4.js b/js/helper-classes/RDGE/src/core/script/math/mat4.js index 32c7111c..a0f47bcf 100755 --- a/js/helper-classes/RDGE/src/core/script/math/mat4.js +++ b/js/helper-classes/RDGE/src/core/script/math/mat4.js @@ -1,24 +1,25 @@ /* -Copyright (c) 2012, Motorola Mobility, Inc +Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. -BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of Motorola Mobility nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Motorola Mobility LLC nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -29,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ /** -* This library contains functions for operating on 4x4 matrices. Any JS array -* containing at least 16 numeric components can represent a 4x4 matrix. +* This library contains functions for operating on 4x4 matrices. Any JS array +* containing at least 16 numeric components can represent a 4x4 matrix. * * For example, all of these are valid matrix construction methods: * ... @@ -39,15 +40,15 @@ POSSIBILITY OF SUCH DAMAGE. * var c = mat4.lookAt( [0, 0, 0], [1, 0, 0], [ 0, 1, 0 ] ); * var d = mat4.basis( [1, 0, 0], [0, 1, 0], [ 0, 0, 1 ] ); * -* This library is implemented assuming components are arranged -* contiguously in memory as such: +* This library is implemented assuming components are arranged +* contiguously in memory as such: * M = [ x0, x1, x2, x3, * y0, y1, y2, y3, * z0, z1, z2, z3, * w0, w1, w2, w3 ]; -* The translation components of a transformation matrix would be stored in -* w0, w1, w2, or at indices 12, 13, and 14 of the array, as is consistent -* with OpenGL. +* The translation components of a transformation matrix would be stored in +* w0, w1, w2, or at indices 12, 13, and 14 of the array, as is consistent +* with OpenGL. */ // RDGE namespaces var RDGE = RDGE || {}; @@ -81,7 +82,7 @@ RDGE.mat4.toCSSString = function (m, conversionConstant) { /** * RDGE.mat4.verify -* This function is provided for debugging purposes only. It is not recommended +* This function is provided for debugging purposes only. It is not recommended * to be used in performance critical areas of the code. */ RDGE.mat4.verify = function (m) { @@ -231,10 +232,10 @@ RDGE.mat4.angleAxis = function (angle, axis) { RDGE.mat4.lookAt = function (eye, at, up) { /* var w_axis = new RDGE.vec3(posVec.x, posVec.y, posVec.z); - + var z_axis = subVec3(targetVec, w_axis); z_axis.normalize(); - + var x_axis = crossVec3(upVec, z_axis); x_axis.normalize(); @@ -522,7 +523,7 @@ RDGE.mat4._adjoint = function (m) { */ RDGE.mat4.inverse = function (m) { // Calculate the 4x4 determinant - // If the determinant is zero, + // If the determinant is zero, // then the inverse matrix is not unique. var det = RDGE.mat4._det4x4(m); @@ -580,7 +581,7 @@ RDGE.mat4.transformPoint = function (m, v) { m[1] * x + m[5] * y + m[9] * z + m[13] * w, m[2] * x + m[6] * y + m[10] * z + m[14] * w, m[3] * x + m[7] * y + m[11] * z + m[15] * w]; - // 12 adds, 16 multiplies, 16 lookups. + // 12 adds, 16 multiplies, 16 lookups. }; /** @@ -589,7 +590,7 @@ RDGE.mat4.transformPoint = function (m, v) { RDGE.mat4.transformVector = function (m, v) { m = RDGE.mat4.inverse(m); var x = v[0], y = v[1], z = v[2], w = v.length >= 4 ? v[3] : 0.0; - // 12 adds, 16 multiplies, 16 lookups. + // 12 adds, 16 multiplies, 16 lookups. // transpose multiply return [m[0] * x + m[1] * y + m[2] * z + m[3] * w, m[4] * x + m[5] * y + m[6] * z + m[7] * w, diff --git a/js/helper-classes/RDGE/src/core/script/math/quat.js b/js/helper-classes/RDGE/src/core/script/math/quat.js index a3812084..05b5ca48 100755 --- a/js/helper-classes/RDGE/src/core/script/math/quat.js +++ b/js/helper-classes/RDGE/src/core/script/math/quat.js @@ -1,24 +1,25 @@ /* -Copyright (c) 2012, Motorola Mobility, Inc +Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. -BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of Motorola Mobility nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Motorola Mobility LLC nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -33,9 +34,9 @@ POSSIBILITY OF SUCH DAMAGE. * RDGE.quat = {} * This library contains utility functions for operating on quaternions. * -- -* TODO: -* -need to add more helper functions for generating quaternions from -* other representations (i.e. - eulers, angle-axis). +* TODO: +* -need to add more helper functions for generating quaternions from +* other representations (i.e. - eulers, angle-axis). */ var RDGE = RDGE || {}; RDGE.quat = {}; diff --git a/js/helper-classes/RDGE/src/core/script/math/vec2.js b/js/helper-classes/RDGE/src/core/script/math/vec2.js index 0a5b832d..ddc1be11 100755 --- a/js/helper-classes/RDGE/src/core/script/math/vec2.js +++ b/js/helper-classes/RDGE/src/core/script/math/vec2.js @@ -1,24 +1,25 @@ /* -Copyright (c) 2012, Motorola Mobility, Inc +Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. -BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of Motorola Mobility nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Motorola Mobility LLC nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -31,8 +32,8 @@ POSSIBILITY OF SUCH DAMAGE. /** * RDGE.vec2 = {} -* This library contains functions for operating on 2D vectors. -* A 2D vector can be any array containing at least 2 numeric components. +* This library contains functions for operating on 2D vectors. +* A 2D vector can be any array containing at least 2 numeric components. * All of the following are valid methods for declaring a RDGE.vec2: * var a = [0, 1]; * var b = RDGE.vec2.zero(); @@ -50,7 +51,7 @@ RDGE.vec2.string = function (v) { /** * RDGE.vec2.verify -* This function is provided for debugging purposes only. It is not recommended +* This function is provided for debugging purposes only. It is not recommended * to be used in performance critical areas of the code. */ RDGE.vec2.verify = function (v) { diff --git a/js/helper-classes/RDGE/src/core/script/math/vec3.js b/js/helper-classes/RDGE/src/core/script/math/vec3.js index c50df00c..c2354ce1 100755 --- a/js/helper-classes/RDGE/src/core/script/math/vec3.js +++ b/js/helper-classes/RDGE/src/core/script/math/vec3.js @@ -1,24 +1,25 @@ /* -Copyright (c) 2012, Motorola Mobility, Inc +Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. -BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of Motorola Mobility nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Motorola Mobility LLC nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -31,8 +32,8 @@ POSSIBILITY OF SUCH DAMAGE. /** * RDGE.vec3 = {} - * This library contains functions for operating on 3D vectors. Any JS array - * containing at least 3 numeric components can represent a 3D vector. + * This library contains functions for operating on 3D vectors. Any JS array + * containing at least 3 numeric components can represent a 3D vector. * * For example, all of these are valid RDGE.vec3 declarations: * var a = [0, 0, 1]; @@ -52,7 +53,7 @@ RDGE.vec3.string = function (v) { /** * RDGE.vec3.verify - * This function is provided for debugging purposes only. It is not recommended + * This function is provided for debugging purposes only. It is not recommended * to be used in performance critical areas of the code. */ RDGE.vec3.verify = function (v) { @@ -94,7 +95,7 @@ RDGE.vec3.translation = function (m) { }; /** -* RDGE.vec3.basisX = function( m ) +* RDGE.vec3.basisX = function( m ) * description : returns a vector containing the translation vector of m. */ RDGE.vec3.basisX = function (m) { @@ -102,7 +103,7 @@ RDGE.vec3.basisX = function (m) { }; /** -* RDGE.vec3.basisY = function( m ) +* RDGE.vec3.basisY = function( m ) * description : returns a vector containing the translation vector of m. */ RDGE.vec3.basisY = function (m) { @@ -110,7 +111,7 @@ RDGE.vec3.basisY = function (m) { }; /** -* RDGE.vec3.basisZ = function( m ) +* RDGE.vec3.basisZ = function( m ) * description : returns a vector containing the translation vector of m. */ RDGE.vec3.basisZ = function (m) { @@ -155,14 +156,14 @@ RDGE.vec3.random = function (min, max) { }; /** -* RDGE.vec3.xy +* RDGE.vec3.xy */ RDGE.vec3.xy = function (v) { return [v[0], v[1]]; }; /** -* RDGE.vec3.xz +* RDGE.vec3.xz */ RDGE.vec3.xz = function (v) { return [v[0], v[2]]; @@ -222,7 +223,7 @@ RDGE.vec3.plusEqualMul = function (a, b, s) { }; /** -* RDGE.vec3.scale +* RDGE.vec3.scale */ RDGE.vec3.scale = function (v, s) { if (s.length !== undefined && s.length >= 3) { @@ -264,7 +265,7 @@ RDGE.vec3.normalize = function (v) { }; /** -* RDGE.vec3.cross +* RDGE.vec3.cross */ RDGE.vec3.cross = function (a, b) { return [a[1] * b[2] - b[1] * a[2], @@ -273,7 +274,7 @@ RDGE.vec3.cross = function (a, b) { }; /** -* RDGE.vec3.dot +* RDGE.vec3.dot */ RDGE.vec3.dot = function (a, b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; diff --git a/js/helper-classes/RDGE/src/core/script/math/vec4.js b/js/helper-classes/RDGE/src/core/script/math/vec4.js index 53759d6e..4eb4a03b 100755 --- a/js/helper-classes/RDGE/src/core/script/math/vec4.js +++ b/js/helper-classes/RDGE/src/core/script/math/vec4.js @@ -1,24 +1,25 @@ /* -Copyright (c) 2012, Motorola Mobility, Inc +Copyright (c) 2012, Motorola Mobility LLC. All Rights Reserved. -BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of Motorola Mobility nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Motorola Mobility LLC nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -30,8 +31,8 @@ POSSIBILITY OF SUCH DAMAGE. /** * RDGE.vec4 = {} -* This library contains functions for operating on 4D vectors. Any JS array -* containing at least 4 numeric components can represent a 4D vector. +* This library contains functions for operating on 4D vectors. Any JS array +* containing at least 4 numeric components can represent a 4D vector. * * For example, all of these are valid RDGE.vec4 declarations: * var a = [0, 0, 0, 1]; -- cgit v1.2.3