src/math/OrthoNormalBasis.js
function (plane, rightvector) {
  if (arguments.length < 2) {
    // choose an arbitrary right hand vector, making sure it is somewhat orthogonal to the plane normal:
    rightvector = vec3.random(plane)
  } else {
    rightvector = rightvector
  }
  this.v = vec3.unit(vec3.cross(plane, rightvector))
  this.u = vec3.cross(this.v, plane)
  this.plane = plane
  this.planeorigin = vec3.scale(plane[3], plane)
}
function (plane, rightvector) {
  if (arguments.length < 2) {
    // choose an arbitrary right hand vector, making sure it is somewhat orthogonal to the plane normal:
    rightvector = vec3.random(plane)
  } else {
    rightvector = rightvector
  }
  this.v = vec3.unit(vec3.cross(plane, rightvector))
  this.u = vec3.cross(this.v, plane)
  this.plane = plane
  this.planeorigin = vec3.scale(plane[3], plane)
}
function ( plane , rightvector ) { if ( arguments . length < 2 ) { // choose an arbitrary right hand vector, making sure it is somewhat orthogonal to the plane normal: rightvector = vec3 . random ( plane ) } else { rightvector = rightvector } this . v = vec3 . unit ( vec3 . cross ( plane , rightvector ) ) this . u = vec3 . cross ( this . v , plane ) this . plane = plane this . planeorigin = vec3 . scale ( plane [ 3 ] , plane ) }
class OrthoNormalBasis
Reprojects points on a 3D plane onto a 2D plane
or from a 2D plane back onto the 3D plane
@param  {Plane} plane
@param  {Vector3D|Vector2D} rightvector
class OrthoNormalBasis Reprojects points on a 3D plane onto a 2D plane or from a 2D plane back onto the 3D plane