aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/math-utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/3D/math-utils.js')
-rwxr-xr-xjs/helper-classes/3D/math-utils.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js
index 409d2750..4da3d2c8 100755
--- a/js/helper-classes/3D/math-utils.js
+++ b/js/helper-classes/3D/math-utils.js
@@ -784,7 +784,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
784 }, 784 },
785 785
786 boundaryContainsPoint: { 786 boundaryContainsPoint: {
787 value: function( bounds, targetPt, backFacing ) 787 value: function( bounds, targetPt, backFacing, onParams )
788 { 788 {
789 var pt = targetPt.slice(0); 789 var pt = targetPt.slice(0);
790 while (pt.length > 2) pt.pop(); 790 while (pt.length > 2) pt.pop();
@@ -817,7 +817,14 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
817 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0); 817 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0);
818 var dot = VecUtils.vecDot(2, vec0, vec1); 818 var dot = VecUtils.vecDot(2, vec0, vec1);
819 if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0)) 819 if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0))
820 {
821 if (onParams)
822 {
823 onParams[0] = (i+3) % 4;
824 onParams[1] = t;
825 }
820 return this.ON; 826 return this.ON;
827 }
821 else 828 else
822 return this.OUTSIDE; 829 return this.OUTSIDE;
823 } 830 }