Package org.earth3d.jearth.math

Examples of org.earth3d.jearth.math.Matrix


        quat.createFromAxisAngle((float) axis.x, (float) axis.y, (float) axis.z, len);
        quat.createMatrix(matrix);

        nav.stopAutoNavigation();

        Matrix mMatrix = new Matrix(matrix);

        setViewer(mMatrix.multvector(nav.viewer));

        nav.setDirection(mMatrix.multvector(nav.getDirection()));
        nav.setUp(mMatrix.multvector(nav.getUp()));

        old_sd = sd;

        updateScreen();
View Full Code Here


      float matrix[] = new float[16];
      Quaternion quat = new Quaternion();
      quat.createFromAxisAngle((float) axis.x, (float) axis.y, (float) axis.z, -1);
      quat.createMatrix(matrix);

      Matrix mMatrix = new Matrix(matrix);

      nav.setDirection(mMatrix.multvector(nav.getDirection()));
      nav.setUp(mMatrix.multvector(nav.getUp()));

//      nav.setViewer(nav.viewer-(nav.viewer.normalize()/6000.));
//      if (nav.viewer.length()<1) nav.viewer = nav.viewer.normalize();
      /* rotate around x */
      nav.rotate(roll);
 
View Full Code Here

    /* rotate the up vector around the direction vector */
    float matrix[] = new float[16];
    Quaternion quat = new Quaternion();
    quat.createFromAxisAngle((float) direction.x, (float) direction.y, (float) direction.z, angle);
    quat.createMatrix(matrix);
    Matrix mMatrix = new Matrix(matrix);
   
    up = mMatrix.multvector(up);
  }
View Full Code Here

    /* rotate the direction vector around the up vector */
    float matrix[] = new float[16];
    Quaternion quat = new Quaternion();
    quat.createFromAxisAngle((float) up.x, (float) up.y, (float) up.z, angle);
    quat.createMatrix(matrix);
    Matrix mMatrix = new Matrix(matrix);
   
    direction = mMatrix.multvector(direction);
  }
View Full Code Here

    Quaternion quat = new Quaternion();
    Point3D viewnorm = viewer.normalize();

    quat.createFromAxisAngle((float) viewnorm.x, (float) viewnorm.y, (float) viewnorm.z, angle);
    quat.createMatrix(matrix);
    Matrix mMatrix = new Matrix(matrix);
   
    direction = mMatrix.multvector(direction);
    up = mMatrix.multvector(up);
  }
View Full Code Here

    float matrix[] = new float[16];
    Quaternion quat = new Quaternion();
    quat.createFromAxisAngle((float) upxdir.x, (float) upxdir.y, (float) upxdir.z, angle);
    quat.createMatrix(matrix);
   
    Matrix mMatrix = new Matrix(matrix);
    direction = mMatrix.multvector(direction);
    up = mMatrix.multvector(up);
  }
View Full Code Here

    Point3D norm = viewer.normalize();

    quat.createFromAxisAngle((float) norm.x, (float) norm.y, (float) norm.z, 90);
    quat.createMatrix(matrix);
   
    Matrix mMatrix = new Matrix(matrix);
    Point3D strafedirection = mMatrix.multvector(direction);

    viewer = viewer.add(strafedirection.multiply(factor).multiply(viewer.length()-1));
  }
View Full Code Here

    Point3D norm = r.normalize();

    quat.createFromAxisAngle((float) norm.x, (float) norm.y, (float) norm.z, (float) alpha);
    quat.createMatrix(matrix);
   
    Matrix mMatrix = new Matrix(matrix);
    direction = mMatrix.multvector(direction);
    up = mMatrix.multvector(up);
  }
View Full Code Here

    Point3D norm = r.normalize();

    quat.createFromAxisAngle((float) norm.x, (float) norm.y, (float) norm.z, (float) alpha);
    quat.createMatrix(matrix);

    Matrix mMatrix = new Matrix(matrix);
    direction = mMatrix.multvector(direction);
    up = mMatrix.multvector(up);
  }
View Full Code Here

    float matrix[] = new float[16];
    Quaternion quat = new Quaternion();
    quat.createFromAxisAngle((float) rotateAxes.x, (float) rotateAxes.y, (float) rotateAxes.z, angle);
    quat.createMatrix(matrix);
   
    Matrix mMatrix = new Matrix(matrix);
    direction = mMatrix.multvector(direction);
    up = mMatrix.multvector(up);
    dirToIsect = mMatrix.multvector(dirToIsect);

    viewer = isect.sub(dirToIsect);
    return true;
  }
View Full Code Here

TOP

Related Classes of org.earth3d.jearth.math.Matrix

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.