Package javax.vecmath

Examples of javax.vecmath.SingularMatrixException


     */
    final void invertAffine() {
  double determinant = affineDeterminant();

  if (determinant == 0.0)
      throw new SingularMatrixException(J3dI18N.getString("Transform3D1"));

  double s = (mat[0]*mat[0] + mat[1]*mat[1] +
              mat[2]*mat[2] + mat[3]*mat[3])*
             (mat[4]*mat[4] + mat[5]*mat[5] +
              mat[6]*mat[6] + mat[7]*mat[7])*
 
View Full Code Here


  System.arraycopy(t1.mat, 0, tmp, 0, tmp.length);

  // Calculate LU decomposition: Is the matrix singular?
  if (!luDecomposition(tmp, row_perm)) {
      // Matrix has no inverse
      throw new SingularMatrixException(J3dI18N.getString("Transform3D1"));
  }

  // Perform back substitution on the identity matrix
  // luDecomposition will set rot[] & scales[] for use
  // in luBacksubstituation
View Full Code Here

/*      */   final void invertAffine(Transform3D t1)
/*      */   {
/* 2828 */     double determinant = t1.affineDeterminant();
/*      */
/* 2830 */     if (determinant == 0.0D) {
/* 2831 */       throw new SingularMatrixException(J3dI18N.getString("Transform3D1"));
/*      */     }
/*      */
/* 2834 */     double s = (t1.mat[0] * t1.mat[0] + t1.mat[1] * t1.mat[1] + t1.mat[2] * t1.mat[2] + t1.mat[3] * t1.mat[3]) * (t1.mat[4] * t1.mat[4] + t1.mat[5] * t1.mat[5] + t1.mat[6] * t1.mat[6] + t1.mat[7] * t1.mat[7]) * (t1.mat[8] * t1.mat[8] + t1.mat[9] * t1.mat[9] + t1.mat[10] * t1.mat[10] + t1.mat[11] * t1.mat[11]);
/*      */
/* 2841 */     if (determinant * determinant < 1.110223024E-016D * s)
 
View Full Code Here

/*      */   final void invertAffine()
/*      */   {
/* 2876 */     double determinant = affineDeterminant();
/*      */
/* 2878 */     if (determinant == 0.0D) {
/* 2879 */       throw new SingularMatrixException(J3dI18N.getString("Transform3D1"));
/*      */     }
/* 2881 */     double s = (this.mat[0] * this.mat[0] + this.mat[1] * this.mat[1] + this.mat[2] * this.mat[2] + this.mat[3] * this.mat[3]) * (this.mat[4] * this.mat[4] + this.mat[5] * this.mat[5] + this.mat[6] * this.mat[6] + this.mat[7] * this.mat[7]) * (this.mat[8] * this.mat[8] + this.mat[9] * this.mat[9] + this.mat[10] * this.mat[10] + this.mat[11] * this.mat[11]);
/*      */
/* 2888 */     if (determinant * determinant < 1.110223024E-016D * s) {
/* 2889 */       invertGeneral(this);
View Full Code Here

/*      */
/* 2933 */     System.arraycopy(t1.mat, 0, tmp, 0, tmp.length);
/*      */
/* 2936 */     if (!luDecomposition(tmp, row_perm))
/*      */     {
/* 2938 */       throw new SingularMatrixException(J3dI18N.getString("Transform3D1"));
/*      */     }
/*      */
/* 2944 */     this.mat[0] = 1.0D; this.mat[1] = 0.0D; this.mat[2] = 0.0D; this.mat[3] = 0.0D;
/* 2945 */     this.mat[4] = 0.0D; this.mat[5] = 1.0D; this.mat[6] = 0.0D; this.mat[7] = 0.0D;
/* 2946 */     this.mat[8] = 0.0D; this.mat[9] = 0.0D; this.mat[10] = 1.0D; this.mat[11] = 0.0D;
View Full Code Here

     * Inverts this matrix in place.
     */
    public final void invert() {
        final double det = m00*m11 - m01*m10;
        if (det == 0) {
            throw new SingularMatrixException();
        }
        final double swap = m00;
        m00 =  m11 / det;
        m11 = swap / det;
        m10 = -m10 / det;
View Full Code Here

    /**
     * Inverts this matrix in place.
     */
    public final void invert() {
        if (m00 == 0) {
            throw new SingularMatrixException();
        }
        m00 = 1/m00;
    }
View Full Code Here

TOP

Related Classes of javax.vecmath.SingularMatrixException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.