build/modelscript.umd.js
function(obj) {
                if (obj.normal) {
                  // obj is a plane
                  var A = this.anchor.elements, N = this.normal.elements;
                  var A1 = A[0], A2 = A[1], A3 = A[2], N1 = N[0], N2 = N[1], N3 = N[2];
                  var newA = this.anchor.reflectionIn(obj).elements;
                  // Add the plane's normal to its anchor, then mirror that in the other plane
                  var AN1 = A1 + N1, AN2 = A2 + N2, AN3 = A3 + N3;
                  var Q = obj.pointClosestTo([AN1, AN2, AN3]).elements;
                  var newN = [Q[0] + (Q[0] - AN1) - newA[0], Q[1] + (Q[1] - AN2) - newA[1], Q[2] + (Q[2] - AN3) - newA[2]];
                  return Plane$1.create(newA, newN);
                } else if (obj.direction) {
                  // obj is a line
                  return this.rotate(Math.PI, obj);
                } else {
                  // obj is a point
                  var P = obj.elements || obj;
                  return Plane$1.create(this.anchor.reflectionIn([P[0], P[1], (P[2] || 0)]), this.normal);
                }
              }
function(obj) {
                if (obj.normal) {
                  // obj is a plane
                  var A = this.anchor.elements, N = this.normal.elements;
                  var A1 = A[0], A2 = A[1], A3 = A[2], N1 = N[0], N2 = N[1], N3 = N[2];
                  var newA = this.anchor.reflectionIn(obj).elements;
                  // Add the plane's normal to its anchor, then mirror that in the other plane
                  var AN1 = A1 + N1, AN2 = A2 + N2, AN3 = A3 + N3;
                  var Q = obj.pointClosestTo([AN1, AN2, AN3]).elements;
                  var newN = [Q[0] + (Q[0] - AN1) - newA[0], Q[1] + (Q[1] - AN2) - newA[1], Q[2] + (Q[2] - AN3) - newA[2]];
                  return Plane$1.create(newA, newN);
                } else if (obj.direction) {
                  // obj is a line
                  return this.rotate(Math.PI, obj);
                } else {
                  // obj is a point
                  var P = obj.elements || obj;
                  return Plane$1.create(this.anchor.reflectionIn([P[0], P[1], (P[2] || 0)]), this.normal);
                }
              }
function ( obj ) { if ( obj . normal ) { // obj is a plane var A = this . anchor . elements , N = this . normal . elements ; var A1 = A [ 0 ] , A2 = A [ 1 ] , A3 = A [ 2 ] , N1 = N [ 0 ] , N2 = N [ 1 ] , N3 = N [ 2 ] ; var newA = this . anchor . reflectionIn ( obj ) . elements ; // Add the plane's normal to its anchor, then mirror that in the other plane var AN1 = A1 + N1 , AN2 = A2 + N2 , AN3 = A3 + N3 ; var Q = obj . pointClosestTo ( [ AN1 , AN2 , AN3 ] ) . elements ; var newN = [ Q [ 0 ] + ( Q [ 0 ] - AN1 ) - newA [ 0 ] , Q [ 1 ] + ( Q [ 1 ] - AN2 ) - newA [ 1 ] , Q [ 2 ] + ( Q [ 2 ] - AN3 ) - newA [ 2 ] ] ; return Plane$1 . create ( newA , newN ) ; } else if ( obj . direction ) { // obj is a line return this . rotate ( Math . PI , obj ) ; } else { // obj is a point var P = obj . elements || obj ; return Plane$1 . create ( this . anchor . reflectionIn ( [ P [ 0 ] , P [ 1 ] , ( P [ 2 ] || 0 ) ] ) , this . normal ) ; } }
Returns the reflection of the plane in the given point, line or plane.
Returns the reflection of the plane in the given point line or plane .