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 977b9fe4..16d168b6 100755
--- a/js/helper-classes/3D/math-utils.js
+++ b/js/helper-classes/3D/math-utils.js
@@ -809,7 +809,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
809 }, 809 },
810 810
811 boundaryContainsPoint: { 811 boundaryContainsPoint: {
812 value: function( bounds, targetPt, backFacing ) 812 value: function( bounds, targetPt, backFacing, onParams )
813 { 813 {
814 var pt = targetPt.slice(0); 814 var pt = targetPt.slice(0);
815 while (pt.length > 2) pt.pop(); 815 while (pt.length > 2) pt.pop();
@@ -842,7 +842,14 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
842 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0); 842 var t = VecUtils.vecMag(2, vec1)/VecUtils.vecMag(2, vec0);
843 var dot = VecUtils.vecDot(2, vec0, vec1); 843 var dot = VecUtils.vecDot(2, vec0, vec1);
844 if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0)) 844 if ((this.fpSign(dot) >= 0) && (this.fpSign(t) >= 0) && (this.fpCmp(t,1.0) <= 0))
845 {
846 if (onParams)
847 {
848 onParams[0] = (i+3) % 4;
849 onParams[1] = t;
850 }
845 return this.ON; 851 return this.ON;
852 }
846 else 853 else
847 return this.OUTSIDE; 854 return this.OUTSIDE;
848 } 855 }