examples/vr_crop/quickhull.js
function(face, absorbingFace) {
      var faceVertices = this.removeAllVerticesFromFace(face);

      if (faceVertices !== undefined) {
        if (absorbingFace === undefined) {
          // mark the vertices to be reassigned to some other face

          this.unassigned.appendChain(faceVertices);
        } else {
          // if there's an absorbing face try to assign as many vertices as possible to it

          var vertex = faceVertices;

          do {
            // we need to buffer the subsequent vertex at this point because the 'vertex.next' reference
            // will be changed by upcoming method calls

            var nextVertex = vertex.next;

            var distance = absorbingFace.distanceToPoint(vertex.point);

            // check if 'vertex' is able to see 'absorbingFace'

            if (distance > this.tolerance) {
              this.addVertexToFace(vertex, absorbingFace);
            } else {
              this.unassigned.append(vertex);
            }

            // now assign next vertex

            vertex = nextVertex;
          } while (vertex !== null);
        }
      }

      return this;
    }
function(face, absorbingFace) {
      var faceVertices = this.removeAllVerticesFromFace(face);

      if (faceVertices !== undefined) {
        if (absorbingFace === undefined) {
          // mark the vertices to be reassigned to some other face

          this.unassigned.appendChain(faceVertices);
        } else {
          // if there's an absorbing face try to assign as many vertices as possible to it

          var vertex = faceVertices;

          do {
            // we need to buffer the subsequent vertex at this point because the 'vertex.next' reference
            // will be changed by upcoming method calls

            var nextVertex = vertex.next;

            var distance = absorbingFace.distanceToPoint(vertex.point);

            // check if 'vertex' is able to see 'absorbingFace'

            if (distance > this.tolerance) {
              this.addVertexToFace(vertex, absorbingFace);
            } else {
              this.unassigned.append(vertex);
            }

            // now assign next vertex

            vertex = nextVertex;
          } while (vertex !== null);
        }
      }

      return this;
    }
function ( face , absorbingFace ) { var faceVertices = this . removeAllVerticesFromFace ( face ) ; if ( faceVertices !== undefined ) { if ( absorbingFace === undefined ) { // mark the vertices to be reassigned to some other face this . unassigned . appendChain ( faceVertices ) ; } else { // if there's an absorbing face try to assign as many vertices as possible to it var vertex = faceVertices ; do { // we need to buffer the subsequent vertex at this point because the 'vertex.next' reference // will be changed by upcoming method calls var nextVertex = vertex . next ; var distance = absorbingFace . distanceToPoint ( vertex . point ) ; // check if 'vertex' is able to see 'absorbingFace' if ( distance > this . tolerance ) { this . addVertexToFace ( vertex , absorbingFace ) ; } else { this . unassigned . append ( vertex ) ; } // now assign next vertex vertex = nextVertex ; } while ( vertex !== null ) ; } } return this ; }
Removes all the visible vertices that 'face' is able to see
Removes all the visible vertices that face is able to see