Examples of mul()


Examples of javax.media.j3d.Transform3D.mul()

    }
    scale.setScale(new Vector3d(pieceWidth, piece.getHeight(), piece.getDepth()));
    // Change its angle around y axis
    Transform3D orientation = new Transform3D();
    orientation.rotY(-piece.getAngle());
    orientation.mul(scale);
    // Translate it to its location
    Transform3D pieceTransform = new Transform3D();
    pieceTransform.setTranslation(new Vector3f(
        piece.getX(), piece.getElevation() + piece.getHeight() / 2, piece.getY()));     
    pieceTransform.mul(orientation);
View Full Code Here

Examples of javax.media.j3d.Transform3D.mul()

    orientation.mul(scale);
    // Translate it to its location
    Transform3D pieceTransform = new Transform3D();
    pieceTransform.setTranslation(new Vector3f(
        piece.getX(), piece.getElevation() + piece.getHeight() / 2, piece.getY()));     
    pieceTransform.mul(orientation);
   
    // Change model transformation     
    ((TransformGroup)getChild(0)).setTransform(pieceTransform);
  }
 
View Full Code Here

Examples of javax.vecmath.GMatrix.mul()

/*     */     }
/*     */
/* 600 */     GMatrix A_Transpose = new GMatrix(A);
/* 601 */     A_Transpose.transpose();
/* 602 */     GMatrix M = new GMatrix(order + 1, order + 1);
/* 603 */     M.mul(A_Transpose, A);
/*     */     try {
/* 605 */       M.invert();
/*     */     } catch (SingularMatrixException e) {
/* 607 */       System.out.println("SINGULAR MATRIX EXCEPTION in prediction");
/* 608 */       System.out.println(M);
View Full Code Here

Examples of javax.vecmath.GVector.mul()

    public static GVector conjugateGradientSolve( GMatrix matrix, GVector b,
                                                  GVector initialGuess, double eps ) {

        GVector x = new GVector( initialGuess );
        GVector tempv = new GVector( initialGuess );
        tempv.mul( matrix, initialGuess );
        GVector bb = new GVector( b );
        bb.sub( tempv );
        GVector r = new GVector( bb );
        GVector p = new GVector( r );
        GVector xnew = new GVector( p );
View Full Code Here

Examples of javax.vecmath.GVector.mul()

        matrixInverse.invert();
        double error, norm;
        int iteration = 0;

        do {
            matrixMultp.mul( matrix, p );
            double lambda = (r.dot( p ) / p.dot( matrixMultp ));
            xnew.scaleAdd( lambda, p, x );
            rnew.scaleAdd( -lambda, matrixMultp, r );
            double alpha = -(rnew.dot( matrixMultp ) / p.dot( matrixMultp));
            pnew.scaleAdd( alpha, p, rnew );
View Full Code Here

Examples of javax.vecmath.Matrix3f.mul()

        return true;
      Matrix3f mp = new Matrix3f();
      mp.setColumn(0, directLatticeVectors[0]);
      mp.setColumn(1, directLatticeVectors[1]);
      mp.setColumn(2, directLatticeVectors[2]);
      mp.mul(primitiveToCryst);
      a = new Vector3f();
      b = new Vector3f();
      mp.getColumn(0, a);
      mp.getColumn(1, b);
    }
View Full Code Here

Examples of javax.vecmath.Matrix4d.mul()

/*     */     {
/* 480 */       throw new IllegalArgumentException("Both arguments to " + functionName + " must be Matrix4d");
/*     */     }
/*     */
/* 488 */     Matrix4d m4d = new Matrix4d((Matrix4d)elements.get(2));
/* 489 */     m4d.mul((Matrix4d)elements.get(1));
/*     */
/* 491 */     return m4d;
/*     */   }
/*     */
/*     */   private BoundingSphere makeBoundingSphere(ArrayList elements)
View Full Code Here

Examples of javax.vecmath.Matrix4f.mul()

      float dy=(float)(newY-pos2DY)/wsize;
          drotX.rotX(dy * 2 * (float)Math.PI);
      drotY.rotY(dx * 2 * (float)Math.PI);

      Matrix4f transform = new Matrix4f(rot);
      transform.mul(drotX);
      transform.mul(drotY);
      Matrix4f tmp = new Matrix4f(rot);
      tmp.invert();
      transform.mul(tmp);

View Full Code Here

Examples of javax.vecmath.Matrix4f.mul()

          drotX.rotX(dy * 2 * (float)Math.PI);
      drotY.rotY(dx * 2 * (float)Math.PI);

      Matrix4f transform = new Matrix4f(rot);
      transform.mul(drotX);
      transform.mul(drotY);
      Matrix4f tmp = new Matrix4f(rot);
      tmp.invert();
      transform.mul(tmp);

      DirectionalLight light = scene.getLights()[mode];
View Full Code Here

Examples of javax.vecmath.Matrix4f.mul()

      float dy=(float)(newY-pos2DY)/wsize;
          drotX.rotX(-dy * 2 * (float)Math.PI);
      drotY.rotY(-dx * 2 * (float)Math.PI);
     
      Matrix4f transform = new Matrix4f(rot);
      transform.mul(drotX);
      transform.mul(drotY);
      Matrix4f tmp = new Matrix4f(rot);
      tmp.invert();
      transform.mul(tmp);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.