Examples of fromAngles()


Examples of com.ardor3d.math.Matrix3.fromAngles()

            private final Matrix3 rotation = new Matrix3();

            public void update(final double time, final Torus caller) {
                timer += time * 0.5;
                caller.setTranslation(Math.sin(timer) * 40.0, Math.sin(timer) * 40.0, Math.cos(timer) * 40.0);
                rotation.fromAngles(timer * 0.5, timer * 0.5, timer * 0.5);
                caller.setRotation(rotation);
            }
        });

        Texture t0 = TextureManager.load("images/ardor3d_white_256.jpg",
View Full Code Here

Examples of com.ardor3d.math.Matrix3.fromAngles()

            private final Matrix3 rotation = new Matrix3();

            public void update(final double time, final Torus caller) {
                timer += time * 0.5;
                caller.setTranslation(Math.sin(timer) * 40.0, Math.sin(timer) * 40.0, Math.cos(timer) * 40.0);
                rotation.fromAngles(timer * 0.5, timer * 0.5, timer * 0.5);
                caller.setRotation(rotation);
            }
        });

        Texture t0 = TextureManager.load("images/ardor3d_white_256.jpg",
View Full Code Here

Examples of com.ardor3d.math.Matrix3.fromAngles()

            private final Matrix3 rotation = new Matrix3();

            public void update(final double time, final Torus caller) {
                timer += time * 0.5;
                caller.setTranslation(Math.sin(timer) * 40.0, Math.sin(timer) * 40.0, Math.cos(timer) * 40.0);
                rotation.fromAngles(timer * 0.5, timer * 0.5, timer * 0.5);
                caller.setRotation(rotation);
            }
        });

        Texture t0 = TextureManager.load("images/ardor3d_white_256.jpg",
View Full Code Here

Examples of com.ardor3d.math.Matrix3.fromAngles()

            Matrix3 rotation = new Matrix3();

            public void update(final double time, final Torus caller) {
                timer += time;
                caller.setTranslation(Math.sin(timer) * 40.0, Math.sin(timer) * 50.0 + 20.0, Math.cos(timer) * 40.0);
                rotation.fromAngles(timer * 0.4, timer * 0.4, timer * 0.4);
                caller.setRotation(rotation);
            }
        });

        // Attach "billboard" with an alpha test.
View Full Code Here

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

        if (rotZStr != null) {
            rotZ = Float.parseFloat(rotZStr);
        }

        Quaternion rotate = new Quaternion();
        rotate.fromAngles(rotX, rotY, rotZ);

        return new CellTransform(rotate, translation);
    }

   
View Full Code Here

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

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

        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

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

    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.