public static Vec4 intersect(Plane pa,Plane pb,Plane pc){
  if (pa == null || pb == null || pc == null) {
    throw new IllegalArgumentException("Plane Is Null");
  }
  Vec4 na=pa.getNormal();
  Vec4 nb=pb.getNormal();
  Vec4 nc=pc.getNormal();
  Matrix m=new Matrix(na.x,na.y,na.z,0,nb.x,nb.y,nb.z,0,nc.x,nc.y,nc.z,0,0,0,0,1,true);
  Matrix mInverse=m.getInverse();
  Vec4 D=new Vec4(-pa.getDistance(),-pb.getDistance(),-pc.getDistance());
  return D.transformBy3(mInverse);
}

public static Vec4 intersect ( Plane pa , Plane pb , Plane pc ) { if ( pa == null || pb == null || pc == null ) { throw new IllegalArgumentException ( "Plane Is Null" ) ; } Vec4 na = pa . getNormal ( ) ; Vec4 nb = pb . getNormal ( ) ; Vec4 nc = pc . getNormal ( ) ; Matrix m = new Matrix ( na . x , na . y , na . z , 0 , nb . x , nb . y , nb . z , 0 , nc . x , nc . y , nc . z , 0 , 0 , 0 , 0 , 1 , true ) ; Matrix mInverse = m . getInverse ( ) ; Vec4 D = new Vec4 ( - pa . getDistance ( ) , - pb . getDistance ( ) , - pc . getDistance ( ) ) ; return D . transformBy3 ( mInverse ) ; }
compute the intersection of three planes .
