Package com.jme3.math

Examples of com.jme3.math.Quaternion.fromAngles()


            // defines as 3 angles along XYZ axes
            float angleX = parseFloat(attribs.getValue("angleX"));
            float angleY = parseFloat(attribs.getValue("angleY"));
            float angleZ = parseFloat(attribs.getValue("angleZ"));
            Quaternion q = new Quaternion();
            q.fromAngles(angleX, angleY, angleZ);
            return q;
        }
    }

    private void parseLightNormal(Attributes attribs) throws SAXException {
View Full Code Here


        CurrentRotation.x--;
      if(KeyState.containsKey("Down") && KeyState.get("Down"))
        CurrentRotation.x++;

      Quaternion q = new Quaternion();//Quaternion.DIRECTION_Z;
      q.fromAngles(Rotation.x, Rotation.y, Rotation.z);
     
     
      q.mult(CurrentMovement, CurrentMovement);
     
      Position.addLocal(CurrentMovement.multLocal(MovementSpeed * tpf));
 
View Full Code Here

    if (!crouching)
      hector.uncrouch(tpf);

    Quaternion rot = new Quaternion();
    rot.fromAngles(-headAngleY * FastMath.DEG_TO_RAD, -headAngleX * FastMath.DEG_TO_RAD, 0);
    headNode.setLocalRotation(rot);
  }

  private void setupKeys(InputManager input) {
    input.addMapping("jump", new KeyTrigger(KeyInput.KEY_SPACE));
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.