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