Package org.earth3d.jearth.math

Examples of org.earth3d.jearth.math.Quaternion


    if (Global.flyMode) {
      // gravitation
      Point3D axis = nav.viewer.crossproduct(nav.getDirection()).normalize();
      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()));
View Full Code Here

TOP

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

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.