public void addAxisReflection ( int axis ) { assert ( 0 < axis && axis <= dim ) ; // reset inverse transformation - needs recomputation. inv = null ; // Formal: // Matrix homTrans = Matrix.unitMatrix(dim + 1); // homTrans[axis - 1][axis - 1] = -1; // trans = homTrans.times(trans); // Faster: for ( int i = 0 ; i <= dim ; i ++ ) { trans [ axis - 1 ] [ i ] = - trans [ axis - 1 ] [ i ] ; } }
Add a reflection along the given axis .